Hello,
I'm looking at an application bug where on Windows, opening a dialogue causes the program to disappear from the alt-tab menu (though not the taskbar). This seems to be a result of the Qt::Tool flag + WS_EX_TOOLWINDOW style being applied to the dialog widget.
The widget hierarchy is QMainWindow->QDialog. Is it expected that applying this flag to a child seems to effect the parent, as far as how Windows handles it? I'd assume this would just prevent this dialog window from showing up in these places. Or am I missing something, or is something tragically wrong with the code/app somewhere?
I tried changing the hierarchy to QMainWindow->QWidget(central widget)->QDialog, with no effect. Making the QDialog a sibling, or removing the Qt::Tool flag does fix the alt-tab issue but is undesirable behavior.
Seemingly relevant snippets:
{
ui.setupUi(this);
...
}
void MainWin::doClick()
{
QScopedPointer<Poppy> theBox(new Poppy(this));
theBox->setModal(true);
theBox->setWindowState(Qt::WindowActive);
theBox->exec();
}
{
ui.setupUi(this);
this->setWindowFlags(Qt::Tool);
this->setModal(true);
ui.validationWarning->hide();
// connect slots to signals
...
}
MainWin::MainWin(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
...
}
void MainWin::doClick()
{
QScopedPointer<Poppy> theBox(new Poppy(this));
theBox->setModal(true);
theBox->setWindowState(Qt::WindowActive);
theBox->exec();
}
Poppy::Poppy(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
this->setWindowFlags(Qt::Tool);
this->setModal(true);
ui.validationWarning->hide();
// connect slots to signals
...
}
To copy to clipboard, switch view to plain text mode
Bookmarks