Results 1 to 6 of 6

Thread: ideas for skinned widgets

  1. #1
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

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

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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
    Last edited by fullmetalcoder; 28th June 2007 at 09:34. Reason: spelling error
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  4. #4
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default 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().

  5. #5
    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    13
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: ideas for skinned widgets

    hi guys,

    can say how to create a skin widgets

    bye from

    vasanth

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ideas for skinned widgets

    Could you elaborate on the problem?

Similar Threads

  1. Performance in hiding/showing widgets
    By Paalrammer in forum Newbie
    Replies: 12
    Last Post: 14th February 2007, 18:57
  2. Replies: 11
    Last Post: 7th July 2006, 13:09
  3. Creating Widgets
    By hylke in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2006, 08:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.