[visit-developers] graying out a QLabel
Meredith, Jeremy S.
jsmeredith at ornl.gov
Wed Jul 1 15:53:35 EDT 2015
QLabel::setEnabled(false) seems to do what you want. For example, check something like Options -> Appearance: all those strings are raw QLabels, and they should be enabled and disabled based on the checkbox at the top.
Maybe there's a theme issue? At least for the theme I happen to be using, it seems to gray them out pretty decisively.
Oak Ridge National Laboratory
From: Miller, Mark C. [mailto:miller86 at llnl.gov]
Sent: Wednesday, July 01, 2015 3:46 PM
To: visit-developers at elist.ornl.gov
Subject: [visit-developers] graying out a QLabel
In the Save Window Options GUI, the width and height QLineEdit objects have QLabel objects next to them.
For certain aspect ratio modes, the height is ignored (and should be disabled/grayed out).
I am trying to code that and although I have coded disablement of QLineEdit object, the "Height" QLabel object isn't changing color (e.g. graying out) making it still confusing that the object is not disabled. And, using QLabel->setEnabled(false) has no effect. QCheckBox and QRadioButton all gray out *both* the text and the boxes. But, because width and height are the *combination* of QLabel and QLineEdit, they don't behave same.
I suppose one option is to tweek the color of the text directly. But, that seems hackish.
Does anyon know the "right" way to gray out a QLabel object in the gui?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the visit-developers