[visit-developers] graying out a QLabel

Biagas, Kathleen biagas2 at llnl.gov
Wed Jul 1 15:53:03 EDT 2015

If the QLabel for the QLineEdit is not a member of the class, but only created with all the other widgets, you cannot control its enabled state directly.
'widthLabel' needs to be made a class member.  Then when 'widthLineEdit' is disabled,  code can be added to also disable 'widthLabel'.


From: Miller, Mark C. [mailto:miller86 at llnl.gov]
Sent: Wednesday, July 01, 2015 12:46 PM
To: visit-developers at elist.ornl.gov
Subject: [visit-developers] graying out a QLabel/wid

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...
URL: <https://elist.ornl.gov/pipermail/visit-developers/attachments/20150701/3bfdbf7c/attachment.html>

More information about the visit-developers mailing list