ideas for skinned widgets
Hi all,
i've written a qtclass for skinned widgets (own titlebar with moving and resizing) but im not really lucky about my solution.
isn't it possible to do this in an QStyle subclass? i want to draw the frame and the titlebar like i do that now, but i want to skin the buttons and every other things,too. For everything i have a template pixmap and i want to have a "skin-file" in which i say which pixmap is for the buttons, the titlebar .... This file should be in xml.
Then i would like to pack the pixmaps and in another file (a zipped file or something like this).
The QStyle subclass schould open this zipped file read out all data he needs and skin my app. althought i want to change the skin on the fly and give th QStyle subclass another file for read out.
The problem is, i don't know how to zip all the files and read them out and i don't know how to add the resizing and the moving in the QStyle sublcass, can anyone help me?
Everything in Qt 4.3.
If you don't really undertstand what i mean, please tell me.
Re: ideas for skinned widgets
The title bar stuff must be handled in a custom widget. AFAIK it would be extremely difficult (maybe impossible) to implement it properly from a QStyle. As for the rest Style sheets should fit all your needs, even exotic ones, and they are ready to use!!! just write a QSS file (Qt Style Sheet), load it, and there you are :)
Re: ideas for skinned widgets
hm, i thought about that but in a style sheet i can't extract pixmaps from my zipped style file. and i have to resize the pixmaps, get special regions from my template pixmap(i want to use pixmaps like windows xp does) aso.
thanks for reply
Re: ideas for skinned widgets
If you pack the skin files in a rcc file, you can access the files from the style sheet with the ":/" notation. see The Qt Resource System and QDir::setSearchPaths().
Re: ideas for skinned widgets
hi guys,
can say how to create a skin widgets
bye from
vasanth
Re: ideas for skinned widgets
Could you elaborate on the problem?