PDA

View Full Version : An example class for creating a custom-skinned QDial



droneone
11th December 2012, 19:12
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 (http://dronecolony.com/2012/12/11/customized-qdial-with-qss-support/)

Hope this helps anyone working on the same.

amleto
11th December 2012, 20:49
here http://www.qtcentre.org/forums/16-Qt-based-Software would be a good place to post as well! :)

prof.ebral
11th December 2012, 21:35
That button ... o___o

droneone
11th December 2012, 21:48
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 :)

d_stranz
13th December 2012, 00:20
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.

droneone
13th December 2012, 23:26
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.