[Qt-interest] Derived custom widgets
Neville Dastur
qt at dastur.me.uk
Wed Sep 1 15:11:15 CEST 2010
Okay, sorted out the combobox popup issue. I am using
SC_ComboBoxEditField as in a moment of enlightenment I realised that I
am actually trying to put the clear button in the right part of the edit
field.
On 01/09/10 11:42, Neville Dastur wrote:
>
> On 30/08/10 23:08, Scott Aron Bloom wrote:
>>
>> You have to use QStyle::SC_COmboBoxArrow to get the size of the
>> subcontrol with QStyle::subControlRect
>>
> Thank you for the suggestion. Unfortunately, this just gives the size
> of the arrow icon. About 15 pixels. I have tried using the same
> function but with params such as
> style()->subControlRect(QStyle::CC_ToolButton, &opt,
> QStyle::SC_ToolButtonMenu, 0), but none give a reasonable size.
>
> A small gif illustrates the desired result. So on Ubuntu the popup
> button measures 26 x 22 pixels, but obviously this is going to vary by
> style and so was looking for a generic way of getting the size.
>
> I also thought I would illustrate the spinbox problem.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100901/9bbb2021/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2605 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100901/9bbb2021/attachment.gif
More information about the Qt-interest-old
mailing list