[Qt-interest] Derived custom widgets

Scott Aron Bloom Scott.Bloom at onshorecs.com
Tue Aug 31 00:08:23 CEST 2010


You have to use QStyle::SC_COmboBoxArrow to get the size of the
subcontrol with QStyle::subControlRect

 

There probably IS a better way.. but I don't know it J

Scott

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Neville Dastur
Sent: Monday, August 30, 2010 2:50 PM
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Derived custom widgets

 






1) I am using a fudge factor of 24 to account for the combobox drop down
 
arrow button. I can't find a pixel metric for it. Is there a better way 
of getting the width
  
Its part of the style.  I cant remember off the top of my head, but
there is an enum that you can query the style for to get its pixel width
for combo boxes
 
  

Amongst all the QStyle::PM_... enum values
(http://doc.qt.nokia.com/4.6/qstyle.html#PixelMetric-enum) I can't find
one that relates



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100830/72abbc65/attachment.html 


More information about the Qt-interest-old mailing list