Results 1 to 5 of 5

Thread: Disabling does not gray-out buttons

  1. #1
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Disabling does not gray-out buttons

    Hi,

    Qt 4.6
    openSuSE 11.2

    QApplication style set to "plastique" or "oxygen".

    I'd like to disable a QPushButton with setEnabled(false). The button is disabled (no clicks are possible), but not grayed-out. Somehow stupid for the user.

    With the QQApplication style set to "motiff" the button view slightly changes, but still is not gray-out and looks ugly.

    What to do ?

    Thanks

    me

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Disabling does not gray-out buttons

    Override paintEvent ?

  3. #3
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disabling does not gray-out buttons RESOLVED

    Hi,

    I've modified the palette, but I've used the
    QPalette::setColor( ColorRole role, const QColor & color ), instead of
    QPalette::setColor ( ColorGroup group, ColorRole role, const QColor & color )
    so I've changed all color groups instead of active color only.

    Thanks for help

    me

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Disabling does not gray-out buttons RESOLVED

    Curious, works fine here on Gentoo with 4.6.3. This is motif, plastique and oxygen styles from top to bottom:
    screen.png

  5. #5
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disabling does not gray-out buttons RESOLVED

    Thank you ChrisW67, as I already wrote (see above) it was my bug.
    By the way - how to mark a thread noticeably as resolved or finished, so the it is not continued any more ?

    greetings

Similar Threads

  1. dark gray style
    By gjaegy in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2010, 00:39
  2. Disabling the buttons in QWizard
    By divya balachandran in forum Qt Programming
    Replies: 6
    Last Post: 13th October 2008, 23:46
  3. Disabling the buttons in QWizard
    By divya balachandran in forum Qt Programming
    Replies: 1
    Last Post: 17th September 2008, 19:52
  4. Disabling Wizard Buttons in a QWizard
    By JimDaniel in forum Qt Programming
    Replies: 1
    Last Post: 30th October 2007, 18:53
  5. dark gray widgets/background
    By momesana in forum Qt Programming
    Replies: 8
    Last Post: 17th June 2007, 10:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.