View Full Version : multiple mainwindows
JeanC
4th February 2008, 11:32
Good day,
How does one make an app with multiple mainwindows?
For instance an app which has an editor with a mainmenu and toolbars besides it's own mainwindow. These functions are only for mainwindows.
And how does one call such a window modal, so that the user cannot switch to other windows?
Thank you.
Jean.
jpn
4th February 2008, 11:34
How does one make an app with multiple mainwindows?
For instance an app which has an editor with a mainmenu and toolbars besides it's own mainwindow. These functions are only for mainwindows.
QMainWindow is not limited to one instance.
And how does one call such a window modal, so that the user cannot switch to other windows?
See QWidget::windowModality.
JeanC
4th February 2008, 14:55
Yes I see. Thanks.
I assume it's also possible to have a main QMainWindow class which has other QMainWindow members?
QMainWindow is not limited to one instance.
See QWidget::windowModality.
jpn
4th February 2008, 14:58
I assume it's also possible to have a main QMainWindow class which has other QMainWindow members?
Yes, you can use QMainWindow like any other QWidget. You could create for example nested dock areas by placing a QMainWindow inside QDockWidget but of course it might not be very intuitive to the end-user. :)
JeanC
4th February 2008, 18:22
Well I was thinking about a modal editor with a mainmenu but later I realized I haven't seen such a thing ever. :)
Yes, you can use QMainWindow like any other QWidget. You could create for example nested dock areas by placing a QMainWindow inside QDockWidget but of course it might not be very intuitive to the end-user. :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.