qt-interest@trolltech.com
[Top] [All Lists]

Re: unable to redisplay a modal dialog wich was hidden with "show Deskto

Subject: Re: unable to redisplay a modal dialog wich was hidden with "show Desktop" on Windows
From: Martin Ramke
Date: Thu, 03 Feb 2005 17:05:13 +0100
Ok I worked out a possible solution :

the modal QDialog has to be initialized with no parent ( parent=0) so that it gets his own taskbar entry.

initalizing with the parent (QMainWindow) seems just to be a little buggy to me since it leads to the behavior mentioned below...


Martin Ramke wrote:

Not sure I understand what's going wrong for you.


I'm using QT 3.3.2
I'm working on an application which displays a modal dialog while it is
working on something. if the modal dialog is present and the application
is hidden by the "show Desktop" tray icon or WindowsKey+D AND THEN
another window is brought to front, which doesn't belong to the
application. windowsKey+d no longer shows my application again (first
Press -> show Desktop again, second press -> show the clicked windows
again).
My application cannot be restored via taskbar, since the modal dialog is
blocking the command (i think). so the only solution is to kill the
application.



Dutton, Sam wrote:

after bringing another window to top the application showing the


modal dialog cannot be made visible again <<
Not sure I understand what's going wrong for you.
I can used Show Desktop with Qt applications with modal dialogs.
Restoring the app restores the app window and modal dialog as expected.
(I'm using Qt 3.3.3 with Visual Studio 2002 on XP SP2.)

Can you give a bit more explanation of the problem you're having?

Thanks

Sam Dutton

-----Original Message-----
From: owner-qt-interest@xxxxxxxxxxxxx
[mailto:owner-qt-interest@xxxxxxxxxxxxx] On Behalf Of Martin Ramke
Sent: 03 February 2005 11:52
To: qt-interest@xxxxxxxxxxxxx
Subject: unable to redisplay a modal dialog wich was hidden with "show
Desktop" on Windows

Hi,

Windows has this "show Desktop" command (WindowsKey+D) which forces even
modal Dialogs to hide. after bringing another window to top the
application showing the modal dialog cannot be made visible again, so
you have to force the application to close.
i tried to catch a representive Windows Event with winEvent(MSG*)
(m->message==71), since it doesn't get any Focus events anymore if it
was hidden this way and make it visible again, but i didn't have much
success. the Event comes in (but not only in the desired case) and the
method gets executed.
what i tried;

show() -> no effect
update() -> no effect
setWindowState(windowState() & ~WindowMinimized | WindowActive); show();

-> no effect

showNormal() -> windows can be restored but the dialog isn't modal
anymore.

setModal(false); show(); setModal(true); show(); -> windows can be
restored but the dialog isn't modal anymore.

some member values (while hidden by windows) :

isHidden() : false
isVisible(): true
isMinimized() : false

does anyone know a solution for this Problem ? it very urgent !

thx !

--
List archive and information: http://lists.trolltech.com/qt-interest/
This email (and any attachments) is intended solely for the individual(s) to whom addressed. It may contain confidential and/or legally privileged information. Any statement or opinions therein are not necessarily those of ITN unless specifically stated. Any unauthorised use, disclosure or copying is prohibited. If you have received this email in error, please notify the sender and delete it from your system. Security and reliability of the e-mail and attachments are not guaranteed. You must take full responsibility for virus checking.



Independent Television News Limited,
Registered No. 548648 England,

VAT Reg. No: GB 756 2995 81,
200 Gray's Inn Road, London WC1X 8XZ,

Telephone: 020 7833 3000.

--
List archive and information: http://lists.trolltech.com/qt-interest/


--
List archive and information: http://lists.trolltech.com/qt-interest/


--
======================================
KLAR AUTOMATION GMBH

Marktplatz 7
D-91475 Lonnerstadt

Fon: +49 9193 639 779
Fax: +49 9193 639 766

email: martin.ramke@xxxxxxxxxxxxxxxxxx
URL: http://www.klar-automation.de

--
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>