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 ?
Re: QProgressBar appearance only in MdiSubWindow
set QTableWidget and ProgressBar as children of SubWindow.
Re: QProgressBar appearance only in MdiSubWindow
nope ... I call
Code:
progress = new QProgressbarDialog(this);
progress->setModal(true);
progress->setVisible(true);
progress->show();
and it blocks my minwindow
Re: QProgressBar appearance only in MdiSubWindow
According to Qt Docs
Quote:
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