Results 1 to 10 of 10

Thread: Issues updating to QMdiArea

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Location
    Jundiai/SP, Brazil
    Posts
    114
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 7 Times in 6 Posts

    Default Re: Issues updating to QMdiArea

    In first case also I think that the button close doesn't sense. But I note that the majority of the users use even the button X or an any shortcut defined.
    But I don't know. ..I think that a question of conception.

    To open you subwindow try use resize();

    pieceViewForm->resize(300,400);
    pieceViewForm->show();

    Maybe help you.

  2. #2
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    17
    Thanked 7 Times in 4 Posts

    Default Re: Issues updating to QMdiArea

    I have found with my QMdiSubWindows that I need to do a setWidget(myWidget) in my subwindow class constructor. Also, within the myWidget that is in the subwindow class, I have overridden the minimumSizeHint() to return a value.

    As for the close, I have not implemented a close inside the subwindow but I think you should be able to do a signal/slot situation outside of the window (if you make the close button accessible) that can hide or delete the window if that is what you want. I do it with a button on the main window.

  3. The following user says thank you to ntp for this useful post:

    fnmblot (17th December 2007)

  4. #3
    Join Date
    Jul 2006
    Location
    Atlanta, GA
    Posts
    86
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    26
    Thanked 6 Times in 6 Posts

    Default Re: Issues updating to QMdiArea

    This was how I had to do it, if anyone cares. Thanks ntp! I just decided to stop arguing about the close button, and use a Close Activate Window button on the MDI Toolbar area.

    Qt Code:
    1. void nnDBSMainWindow::formView()
    2. {
    3. nnDBSPieceViewForm *pieceViewForm = new nnDBSPieceViewForm;
    4. QMdiSubWindow *subWindow1 = new QMdiSubWindow;
    5. subWindow1->setWidget(pieceViewForm);
    6. MDIArea->addSubWindow(subWindow1);
    7. subWindow1->setAttribute(Qt::WA_DeleteOnClose);
    8. subWindow1->show();
    9. subWindow1->resize(650, 600);
    10. }
    To copy to clipboard, switch view to plain text mode 

    Thanks again to everyone! I don't know where I would be without this forum.
    fnmblot
    --------------------------------------
    Gee Ricky, I'm sorry your mom blew up.

Similar Threads

  1. QMdiArea unwanted actvation
    By fullmetalcoder in forum Qt Programming
    Replies: 7
    Last Post: 12th November 2007, 08:09

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
  •  
Qt is a trademark of The Qt Company.