PDA

View Full Version : [Qt 3] Fading widgets to grey



yop
9th September 2008, 16:00
Hi,
I am trying to achieve an effect of fading a QDialog to grey when another modal QDialog appears on top of it so the user is not distracted or confused by the underlying dialog. Both dialogs have QPixmap backgrounds.
For those who haven't noticed the thread title I 'm talking about Qt 3.

Thanks :)

wysota
9th September 2008, 22:19
I don't think there is an easy way to do that... But maybe instead of that you can simply make the second dialog modal?

yop
10th September 2008, 09:32
The second dialog is modal but the controls used are not the default controls (backgrounds are pictures etc.) and there is a mixup in the UI especially for the not so experienced with technology and PCs (they just can't see the 3-D analogy on a 2D screen). I have seen users using the application and this is actually a problem (they try to interact with the dialog that is in the background and wonder why nothing happens).

This kind of effect is now heavily used in the web (pop ups, log in dialogs) and I find it to be a huge usability improvement when you use modal dialogs. Jacob Nielsen also proposes (http://www.useit.com/alertbox/application-design.html) the same thing when you "have to" use modal dialogs.

The whole idea is to either grey out the background or to apply a transparent color on top of it? (does this make sense?)

wysota
10th September 2008, 10:08
You can always create a big gray widget that would cover all the screen and put it underneath your active dialog. Or alternatively simply create the dialog fullscreen with wide gray nothingness sourounding the useful controls.