[Qt-interest] How do I add my custom pixmaps for theming

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Apr 12 12:48:57 CEST 2010


On Mon, Apr 12, 2010 at 3:00 PM, Parta <lists4pghanghas at gmail.com> wrote:
> Hi
>
> I was looking to add my custom pixmaps and some custom enumerations
> for them using QStyle.
>
> The header file qtsdk-2010.02/qt/src/gui/styles/qstyle.h mentions following
>        // do not add any values below/greater than this

I think this comment is for the QT developers! :)

The author is warning that values beyond this are reserved for users
and might be overwritten by a user.

>         SP_CustomBase = 0xf0000000
>
> I dont understand what this customBase is intended for?

It means user custom types must have a value greater than 0xf0000000
in order not to encroach/clash with QT's reserved types.

You can simply add to this last value customBase value and use it.
This value will not be interpreted by QT.
eg: SP_CustomBase + 1 can be your custom value and it will not be
interpreted any of the exiting QT functions which use this enum.

CMIIW.

HTH,
-mandeep

> I cant extend a enum (language wont allow it).
> Is it meant to add more enumeration in qstyle.h itself.
> Somehow that doesn't feel right. Modifying a header file from the
> framework for such a trivial task !!
>
> Any suggestion in this case ?
>
> --
> Thanks in advance,
> Regards,
> Parta
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list