Results 1 to 3 of 3

Thread: QMdiSubWindow not showing content when closed and opened again

  1. #1
    Join Date
    Mar 2010
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QMdiSubWindow not showing content when closed and opened again

    Hi there

    I'm new here in the forum and also quite new to Qt... so please be patient ;-)

    I've a QMdiAre with different sub windows. The subwindows have the attribute WA_DeleteOnClose set to false. So I can close the window and get it back again with calling the slot showNormal() of the QMdiSubWindow.

    The problem is that the window is empty, when it's closed and opened again.
    I still can get the containing widget (a QGraphicsView) with the QMdiSubWindow::widget() function. But it is not shown in the sub window.

    What do I need to do, to show the content of the window?

    Thx
    woodtluk
    Using Qt 4.7
    Developping on Win 7 and XP
    Using Qt Creator, Eclipse and Visual Studio
    Target Platforms Win, Linux and soon OS X

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMdiSubWindow not showing content when closed and opened again

    try calling the show() of the contained widget before showNormal().
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2010
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMdiSubWindow not showing content when closed and opened again

    Cool it's working...
    Thaks a lot!
    Using Qt 4.7
    Developping on Win 7 and XP
    Using Qt Creator, Eclipse and Visual Studio
    Target Platforms Win, Linux and soon OS X

Similar Threads

  1. [s60] file 'string' cannot be opened
    By estel in forum Newbie
    Replies: 4
    Last Post: 1st July 2009, 23:25
  2. Qt Oracle too many opened cursors
    By sureshbabu in forum Qt Programming
    Replies: 1
    Last Post: 30th November 2007, 18:09
  3. Showing QMainWindow without showing a child QWidget
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2007, 09:03
  4. Saving already opened image ...
    By Godlike in forum Newbie
    Replies: 14
    Last Post: 28th March 2006, 21:17
  5. two databases opened at the same time
    By whoops.slo in forum Newbie
    Replies: 5
    Last Post: 28th January 2006, 14:38

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.