[Qt-interest] Does Qt::WindowModal works on windows XP?

Acenes acenes at gmx.net
Sun Feb 8 10:51:24 CET 2009


Maybe this helps you understand:

In a application with multiple unparented windows (parent = 0), application 
modality will disable all windows, while window modality will only block its 
parent, grandparent etc.



"techsgin" <techsgin at gmail.com> schrieb im Newsbeitrag 
news:gmke9t$n6r$1 at eple.troll.no...
Hi All, and thanks in advance.

This is a bit urgent for us.

According to the help (Qt Assistant)

Qt::WindowModal -
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.
Qt::ApplicationModal -
The window is modal to the application and blocks input to all windows.

Well I have successfully used many times Qt::ApplicationModal, but never 
Qt::WindowModal.

Our pseudo code goes like this.

We have two top level windows (Documents) with no parents, Lets call them 
"window one" and "window two".

Window one creates a QDialog:

QDialog* createWindowModalDialog()
{
      QDialog *lMyDialog = new QDialog(this);

      lMyDialog->setWindowModality(Qt::WindowModal);

      connect(lMyDialog, SIGNAL(finished(int)), this, 
SLOT(sltChildFinished(int)));

      lMyDialog->show();
      return lMyDialog;
}

Now accurding to the ducomentation, I should be able to access "window two" 
and continue with my work on it, but I cant!!!! hmmmm

Am I doing something wrong? Is it a bug?

*There is also a weird behavior in the taskbar when I activte "window two" 
it gets the focus but it is still frozen.

Thanks
TechSgin









 





More information about the Qt-interest-old mailing list