[Qt-interest] drawComplexControl Function
Bo Thorsen
bo at fioniasoftware.dk
Fri Oct 21 08:12:02 CEST 2011
Hi,
Den 21-10-2011 06:42, Muthulakshmi Muthiah Subramanian -ERS, HCL Tech skrev:
> I have customised my scrollbar in ListWidget by reimplementing drawComplexControl.
> The function is called only when i set the Style at application level.
> If i set the style for widget alone( and not setting any app level style) the function is not called. Why?
> I am able to call the drawControl function, but not drawComplexControl.
This is probably because you do something like this:
listWidget->setStyle(...)
right? The scrollbars are actually subwidgets, so try doing this instead:
foreach(QWidget* w, listWidget->findChildren<QScrollBar*>())
w->setStyle(...)
This find all child widgets of type QScrollBar* and sets the style on those.
But actually, a better solution would be to use style sheets.
BTW, if possible, please get rid of the disclaimer below. It's absurd
when the mail is for a public mailinglist that is archived openly.
Cheers,
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
> ::DISCLAIMER::
> -----------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
> this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
> this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender immediately. Before opening any mail and
> attachments please check them for viruses and defect.
>
> -----------------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list