[visit-developers] graying out a QLabel

Miller, Mark C. miller86 at llnl.gov
Wed Jul 1 15:55:16 EDT 2015


Hi Kathleen,

Already took care of that part. I added heightLabel to the class and then added heightLabel->setEnabled() calls appropriately. They have no effect.

Mark


From: <Biagas>, Kathleen <biagas2 at llnl.gov<mailto:biagas2 at llnl.gov>>
Reply-To: "visit-developers at elist.ornl.gov<mailto:visit-developers at elist.ornl.gov>" <visit-developers at elist.ornl.gov<mailto:visit-developers at elist.ornl.gov>>
Date: Wednesday, July 1, 2015 12:53 PM
To: "visit-developers at elist.ornl.gov<mailto:visit-developers at elist.ornl.gov>" <visit-developers at elist.ornl.gov<mailto:visit-developers at elist.ornl.gov>>
Subject: Re: [visit-developers] graying out a QLabel

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’.

Kathleen


From: Miller, Mark C. [mailto:miller86 at llnl.gov]
Sent: Wednesday, July 01, 2015 12:46 PM
To: visit-developers at elist.ornl.gov<mailto: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?

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://elist.ornl.gov/pipermail/visit-developers/attachments/20150701/7e4f19e1/attachment.html>


More information about the visit-developers mailing list