trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: October 2012

Re: [trinity-devel] How to indent and disable a new GUI widget

From: Darrell Anderson <humanreadable@...>
Date: Fri, 12 Oct 2012 16:02:02 -0700 (PDT)
> The check box can be indented by a fixed space via a spacer
> widget, but I suspect that will not yield consistent/correct results
> across various widget styles.  The spacer widget would ideally be set
> to the width of a checkbox by querying the pixel metrics of the current style
> via TQStyle::PM_IndicatorWidth.  Here is some untested
> example code which should be run immediately after creation of the GUI elements
> and before they are shown:
> 
> MySpacer->setWidth(kapp->style().pixelMetric(TQStyle::PM_IndicatorWidth));

So the line above goes in the cpp? Nothing goes in the ui file?

Are there some examples elsewhere I can study to learn?

Darrell