QDialog in the taskbar (Win32)
Hello,
I have a QDialog, that is shown modal using QDialog::exec(). On my Win32 system, I get an item in the taskbar for this dialog. I always believed that if you set your mainwindow as a parent, this taskbar item dissapears.
I do the following:
Code:
QWinWidget winWidget(hWndMain); //WinWidget containing my Win32 mainwindow HWND
QMyDialog dlg(&winWidget); //My dialog, a child of winWidget
dlg.exec();
Is there any other way of hiding the taskbar item for my QDialog?
Re: QDialog in the taskbar (Win32)
Could you try to remove the system menu from your dialog? I remember that I have read something that a taskbar entry only appears when a certain element from the titlebar is visible . You can hide the system menu by removing Qt::WindowSystemMenuHint
from windowFlags:
http://doc.trolltech.com/4.1/qwidget...ndowFlags-prop
Re: QDialog in the taskbar (Win32)
It doesn't make a difference.
Re: QDialog in the taskbar (Win32)
Any update on this topic?
I have a QWidget that I don't want to appear in the Taskbar. For a while I was using the Qt::Tool flag, but that can have weird effects when you try to use -that- widget as a parent of QDialogs (possibly of all widgets)?
Anyway, I tried using the Qt::WindowSystemMenuHint as mentioned above and it did not work for me either.
Thanks,
Daniel
Re: QDialog in the taskbar (Win32)
My problem was forgetting to pass the pointer to the mainwindow to the QDialog constructor, like this
<code>
QMyDialog(QWidget * pParent) :
QDialog(pParent)
</code>
In stead, I passed NULL, which is not so smart of course...