PDA

View Full Version : QDialog and switching applications



Arthur
7th May 2006, 14:01
Hello,

I have the following Dialog:



QWinWidget mainWnd(mainHwnd_);
mainWnd.setWindowFlags(Qt::Window);
MyDialogDialog dlg(&mainWnd); //QDialog derived class
dlg.exec();


The following strange things occur:

- When pressing ALT-TAB in Windows XP, my Application icon is gone. The MyDialog icon is shown instead.
- When switching to another application and switching back, by using the taskbar will show my main window, not the modal dialog. Users think the dialog is gone and cannot use the app anymore.
- If I want to make my application usable again, I have to activate it via ALT-TAB again. Then the dialog is on top.

This is what I want:
Modal dialog, always on top, whenever the application is activated and no icon changes in my ALT-TAB window.

How can I do that?

wysota
7th May 2006, 16:11
What is QWinWidget?

Arthur
7th May 2006, 16:28
A widget delivered by Trolltech for (at least) the commercial version of Qt. It integrates Qt with Win32 API applications.

dimitri
7th May 2006, 18:10
Qt/MFC Migration Framework (http://www.trolltech.com/products/qt/addon/solutions/catalog/4/Windows/qtwinmigrate/)