[Qt] QStyleOption

zeljko zeljko at holobit.net
Sun Jun 3 20:01:53 CEST 2007


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 ...




More information about the Qt mailing list