Results 1 to 5 of 5

Thread: multiple mainwindows

  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default multiple mainwindows

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: multiple mainwindows

    Quote Originally Posted by JeanC View Post
    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.
    J-P Nurmi

  3. #3
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: multiple mainwindows

    Yes I see. Thanks.

    I assume it's also possible to have a main QMainWindow class which has other QMainWindow members?

    Quote Originally Posted by jpn View Post
    QMainWindow is not limited to one instance.
    See QWidget::windowModality.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: multiple mainwindows

    Quote Originally Posted by JeanC View Post
    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.
    J-P Nurmi

  5. #5
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: multiple mainwindows

    Well I was thinking about a modal editor with a mainmenu but later I realized I haven't seen such a thing ever.

    Quote Originally Posted by jpn View Post
    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.

Similar Threads

  1. Object and multiple inheritance for interfaces
    By brcain in forum Qt Programming
    Replies: 8
    Last Post: 29th June 2021, 15:29
  2. mingw32-make : multiple target patterns error
    By tsemer in forum Installation and Deployment
    Replies: 2
    Last Post: 6th November 2007, 14:54
  3. Multiple destination target
    By mdecandia in forum Qt Programming
    Replies: 9
    Last Post: 13th June 2007, 16:42
  4. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  5. Replies: 25
    Last Post: 15th January 2006, 00:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.