Results 1 to 4 of 4

Thread: QProgressBar appearance only in MdiSubWindow

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2011
    Posts
    26
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Windows

    Question QProgressBar appearance only in MdiSubWindow

    Hello Community,

    I have the following problem. I am building a GUI with the following hierarchy:

    1. Mainwindow -> calls a SubWindow in MDIArea
    2. SubWindow shows a QTableWidget with a StartButton
    3. StartButton starts an algorithm in a new thread.

    I want now to implement a ProgressBar, that is shown in the SubWindow. When I allocate it in the QTableWidget and call this->show() it appears as a new window and blocks my mainwindow when it is set modal. How to work with a QProgressBar correctly, so that I can still use the MainWindow and the ProgressBar is shown only in the SubWindow??

    any suggestions ?

  2. #2
    Join Date
    Aug 2011
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QProgressBar appearance only in MdiSubWindow

    set QTableWidget and ProgressBar as children of SubWindow.

  3. #3
    Join Date
    Jul 2011
    Posts
    26
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QProgressBar appearance only in MdiSubWindow

    nope ... I call

    Qt Code:
    1. progress = new QProgressbarDialog(this);
    2. progress->setModal(true);
    3. progress->setVisible(true);
    4. progress->show();
    To copy to clipboard, switch view to plain text mode 

    and it blocks my minwindow
    Last edited by revellix; 15th August 2011 at 11:43.

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QProgressBar appearance only in MdiSubWindow

    According to Qt Docs

    The window is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.
    So basically a model dialog will always block your mainwindow because its the parent of mdi

Similar Threads

  1. Could not get focus on input widgets in mdisubwindow
    By Askar in forum Qt Programming
    Replies: 0
    Last Post: 19th January 2011, 14:29
  2. QPrintDialog appearance
    By dair in forum Qt Programming
    Replies: 4
    Last Post: 21st July 2010, 10:54
  3. Public function called on MDISubWindow ignores code
    By ad5xj in forum Qt Programming
    Replies: 2
    Last Post: 24th February 2009, 16:29
  4. MDISubWindow will not resize
    By ad5xj in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2009, 22:17
  5. Replies: 6
    Last Post: 4th February 2009, 07:46

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.