PDA

View Full Version : Dock widgets PROBLEM



L1L0
7th April 2006, 09:10
Hi,

I use QT 4.1.1 and I noticed a huge problem that might put the project I'm working on hold! A floating dockwidget deactivates then mainwindow and viceversa. This is a stupid flaw and for now I couldn't find any workaround this other than throwing QT out.

Any suggestions will be greatly appreciated!

Thanks.

zlatko
7th April 2006, 09:14
Acytual piece of code will be helpful for find solution ;)

L1L0
7th April 2006, 09:20
Just open the QDesigner, make a dock widget floatable and you will see the problem. Once you click the dock widget the main window is inactive! How can you make the application inactive while working in one of its own windows?!?

zlatko
7th April 2006, 10:24
Hmm...and after run ap you see the same problem?

L1L0
7th April 2006, 11:03
it's the designer itself, or any mainwindow based qt application. They all suffer from this: the mainwindow and the floating dock widget deactivate one another. I'm afraid there is no simple workaround for this as it seems that on windows you have to use the mfc SDI/MDI framework to add floating tool windows that stay activated as laong as the application is activated and also do not deactivate the main window once they get focus.
Nasty ...

jacek
7th April 2006, 11:07
I'm afraid there is no simple workaround for this
What did you try so far? Window is activated when it gets focus, try preventing it.

L1L0
7th April 2006, 13:43
But how can you type text without focus?

jacek
7th April 2006, 16:35
But how can you type text without focus?
I don't get it. You want it to receive keyboard focus, but you don't want it to become active (i.e. to receive the keyboard focus)?

Chicken Blood Machine
7th April 2006, 18:29
Just open the QDesigner, make a dock widget floatable and you will see the problem. Once you click the dock widget the main window is inactive! How can you make the application inactive while working in one of its own windows?!?

This is supposed to happen. Once floated, the window is a speparate entitiy. MS Visual Studio behaves exactly the same. There is no flaw in Qt here.

If you really want this bizarre behaviour, just call activateWindow() on the main window after the dock window is floated.