Results 1 to 4 of 4

Thread: showMaximized in MDI

  1. #1
    Join Date
    Jul 2007
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default showMaximized in MDI

    Hi!!

    Im preoblem using MDI and subwindow.
    The problem is when use showMaximized(), setWindowFlags(Qt::WindowTitleHint) not found.

    But I use show() setWindowFlags(Qt::WindowTitleHint) remove button OK.

    Where is de problem?

    The code is:
    Qt Code:
    1. QMdiSubWindow *subWindow1 = new QMdiSubWindow(this);
    2. subWindow1->setWindowTitle(tr("ZZZZ"));
    3.  
    4. subWindow1->setWindowFlags(Qt::WindowTitleHint);
    5. subWindow1->setAttribute(Qt::WA_DeleteOnClose);
    6. subWindow1->setWidget(new QPushButton("xxx"));
    7.  
    8. mdiArea->addSubWindow(subWindow1);
    9. subWindow1->showMaximized();
    10. //subWindow1->show();
    To copy to clipboard, switch view to plain text mode 

    Thz

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: showMaximized in MDI

    Maximized windows don't have titles. Their title is shown on the viewport's title bar.

  3. #3
    Join Date
    Jul 2007
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: showMaximized in MDI

    Quote Originally Posted by wysota View Post
    Maximized windows don't have titles. Their title is shown on the viewport's title bar.

    Sorry, the correct line is:

    Qt Code:
    1. subWindow1->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
    To copy to clipboard, switch view to plain text mode 

    But not found

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: showMaximized in MDI

    This would make the mdi child a top level window, but that wouldn't make any sense, would it? What are you trying to achieve?

Similar Threads

  1. Problem with showMaximized()
    By Lykurg in forum Newbie
    Replies: 6
    Last Post: 11th July 2007, 09:06
  2. showMaximized doesnt show the canvas
    By Kapil in forum Qt Programming
    Replies: 5
    Last Post: 23rd May 2006, 12:22

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.