Results 1 to 6 of 6

Thread: An example class for creating a custom-skinned QDial

  1. #1
    Join Date
    Dec 2011
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default An example class for creating a custom-skinned QDial

    I had to create a custom-skinned QDial (with custom dial and needle images) recently, and I couldn't find any complete examples of doing it. While it isn't the hardest thing in the world, I thought I'd post a complete example of a class to do this.

    This class also allows the QDial to be customized via Qt Style Sheets, and works well in Qt Designer (when a QDial widget is promoted to this class). This class has some limitations, but should be a good starting point for anyone who wants to do the same.

    The complete class is posted here: Customized QDial with QSS Support

    Hope this helps anyone working on the same.

  2. The following user says thank you to droneone for this useful post:

    prof.ebral (11th December 2012)

  3. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: An example class for creating a custom-skinned QDial

    here http://www.qtcentre.org/forums/16-Qt-based-Software would be a good place to post as well!
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  4. #3
    Join Date
    Feb 2010
    Posts
    96
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: An example class for creating a custom-skinned QDial

    That button ... o___o

  5. #4
    Join Date
    Dec 2011
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: An example class for creating a custom-skinned QDial

    d'oh, I guess I should've posted it in the other forum! Too bad there isn't a move to forum function for authors, maybe an admin will move it? I'd hate to double-post and anger the forum

  6. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: An example class for creating a custom-skinned QDial

    I don't think the forum will get angry. After all, it's just a web application :-)

    Not likely that the forum users will get angry either, especially if you preface your repost with an explanation that it was suggested in this original post that you repost in the applications section.

    I might also suggest that you publish it under the LGPL rather than GPL license, to be consistent with Qt itself.

  7. #6
    Join Date
    Dec 2011
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: An example class for creating a custom-skinned QDial

    Thanks =)

    I'll need to consider the LGPL vs. GPL, it became GPL naturally because of where it sits within its larger application, if it had been in a different location, it would've been LGPL. That is to say, it is part of a specific program that uses libraries we release under LGPL, but the application its self is GPL (for good reason). I'll make sure that we make some of these utility classes that aren't related to the business logic LGPL.

Similar Threads

  1. Replies: 7
    Last Post: 18th August 2011, 14:43
  2. Creating pointer to a Class
    By Archa4 in forum Newbie
    Replies: 16
    Last Post: 10th February 2011, 12:58
  3. Trouble with creating custom class
    By jstippey in forum Qt Programming
    Replies: 9
    Last Post: 12th January 2011, 14:08
  4. Stuck creating << and >> operators for my custom class.
    By agerlach in forum Qt Programming
    Replies: 12
    Last Post: 3rd January 2011, 21:44
  5. Trying to create custom QDial
    By dpatel in forum Newbie
    Replies: 3
    Last Post: 16th March 2010, 12:33

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
  •  
Qt is a trademark of The Qt Company.