c++ - Qt multiple UIs -
i have qt project 2 ui classes/forms. main class creates second_window object , opens second window so:
second_window* sec_win = new second_window(this); qt::windowflags flags = sec_win->windowflags(); sec_win->setwindowflags((flags | qt::windowminmaxbuttonshint) & ~qt::windowcontexthelpbuttonhint); sec_win->show();
the second window opens , displays fine. still able interact main window, clicking main window not bring front of second window. second window on top of first. idea how change this? have researched qt::windowflags , none of them seem need. have researched alternatives show() method no luck yet.
qwidget::raise()
in case, if widgets non-modal. or pass nullptr
instead of this
. , don't forget release widgets memory.
Comments
Post a Comment