[Qt] QStyleOption
Павел Ишенин
webpirat at mail.ru
Mon Jun 4 17:11:14 CEST 2007
zeljko wrote:
> On Sunday 03 June 2007 18:58, Павел Ишенин wrote:
>
>> zeljko wrote:
>>
>>> On Sunday 03 June 2007 18:12, Павел Ишенин wrote:
>>>
>>>> Hello, Qt-Lazarus mail list
>>>>
>>>> I am writing this mail here since I cannot get any answer from Den Jean
>>>> about 2 weeks and I think it is probably problems with delivering or
>>>> spam filters.
>>>>
>>>> In 1.30 version of bindings we have QStyleOption and descendants, but we
>>>> have no getters and setters for various QStyleOption properties. Without
>>>> them we cannot use that classes.
>>>>
>>>> At this moment I need this setters:
>>>> - QStyleOptionButton_setButtonFeatures
>>>> - QStyleOption_setState
>>>> - QStyleOption_setRect
>>>>
>>> hm...there's no public "getters" and "setters" for QStyleOptionXXX, they
>>> are used just to describe drawing parameters of come control eg. Button.
>>>
>> Ok, lets look at example here
>> http://linux.fopf.mipt.ru/files/programming/qt/4.2/qstyleoption.html
>> How can I set
>>
>> option.state
>> option.features
>> option.text
>> option.icon
>>
>
> hum...those are enums and public variables, som variables can be initialized
> via initFrom(const QWidget * widget), so for button you should use
> QStyleOptionButton(), create widget and give it to QStyleOption via
> initFrom(), widget already have a text, rect etc ...
>
But what should I do if have no widget? Where to get apropriate widget
for TSpeedButton? for TSplitter? I need this for TQtThemeServices class
implementation. I have no widgets but I need to widget parts. So I need
some way to set that properties without InitFrom call.
Best regards,
Paul Ishenin.
More information about the Qt
mailing list