[SOLVED] bring active window to front
-
Hi,
i have a mainwindow and a button on it. by clicking on the button a new dialog will be shown. i want this new window to be activated when clicking on elsewhere on the main window. Exactly like when you press Ctrl+o in qt creator and it opens File open dialog box and from then on, when clicking anywhere inside qt creator file open dialog box will be activated. -
It sounds like you just want to show a modal window. Either inherit your widget from QDialog or set "window modality":http://qt-project.org/doc/qt-5.1/qtwidgets/qwidget.html#windowModality-prop manually.
-
Hi,
You need to give the mainwindow as a parent to your dialog and it will be done for you
-
[quote author="SGaist" date="1382296336"]Hi,
You need to give the mainwindow as a parent to your dialog and it will be done for you[/quote]
yes, you are right.
thanks :-)