[Qt-interest] QWidget::setDisabled()

Marc Reilly marc at cpdesign.com.au
Fri Jul 30 02:31:33 CEST 2010


Hi,

On Friday, July 30, 2010 03:52:59 am Atlant Schmidt wrote:
>   Two suggestions, either or both of which may turn
>   out to be "dumb":
> 
>     1. Use a stylesheet to make the ".disabled"
>        appearance of everything look like the
>        default appearance of everything. (This
>        sounds like it could be a lot of work.)
> 
>     2. Create a transparent widget *ATOP* your
>        widget and make the transparent widget
>        catch and accept() all the mouse clicks.
> 

The second one isn't dumb.

The simplest way may be to install an event filter on your top level window 
which ignores all mouse and key events.

(Why you would want to do this is another matter)

Cheers,
Marc



More information about the Qt-interest-old mailing list