PDA

View Full Version : really stupid/easy question on Widget Subclassing



Rooster
14th February 2008, 18:37
In know that this a stupid and very newbie question, but I am having a hard time finding information on it.

What I would like to learn how to do is to create a subclass widget and apply it to a layout that I already have created. I will do a series of QPainter things to this widget if that helps with anything. I have a book but it doesn't not get into subclassing at all. If you could give me a code example of this or a good tutorial I would be greatly appreciated.

Again I know this is trivial to a lot of you but I need some help.

Thanks

JimDaniel
14th February 2008, 18:50
Take a look at my Vista-style AeroButton class:

http://www.qtcentre.org/forum/f-qt-software-16/t-vistaglassbutton-widget-for-qt-4-11834.html

I subclass a QPushButton and repaint it...maybe it will help, although I notice you're using Qt3. I'd be happy to help with any other specific questions you have.

Rooster
14th February 2008, 21:06
I will take a look at it, but does anyone have an example from qt3 that I could take a look at.