[visit-developers] graying out a QLabel

Meredith, Jeremy S. jsmeredith at ornl.gov
Wed Jul 1 17:21:00 EDT 2015


Oh, well that's good news then.  Well, not the eye thing of course, but that we've got an answer to the technical problem.   Do I get half credit for "theme issue"?    :-)

--
Jeremy Meredith
Oak Ridge National Laboratory

From: Miller, Mark C. [mailto:miller86 at llnl.gov]
Sent: Wednesday, July 01, 2015 4:03 PM
To: VisIt Developers
Subject: Re: [visit-developers] graying out a QLabel

Well, thats just proof my eyes are going bad.

Indeed, setEnabled *is* having an effect. Its just barely noticeable on my mac and is not consistent with level of graying out occuring in other objects. So, I concluded it wasn't happening.

It *is* happening. Its just not nearly as pronounced as for other objects (like QCheckBox and QRadioButton).

Thanks.

Mark


From: <Meredith>, "Jeremy S." <jsmeredith at ornl.gov<mailto:jsmeredith at ornl.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

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.

--
Jeremy Meredith
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<mailto: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?

Mark

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


More information about the visit-developers mailing list