Questions about QT Designer

Jacek Wojdel wojdel at chrysler.kbs.twi.tudelft.nl
Thu Jan 24 10:45:27 GMT 2002


On Wednesday 23 January 2002 21:07, you wrote:
> Anyone have any hints?  If I need to add a custom widget, what stuff do
> I need to put where to make it work?  Has anyone created other custom
> widgets?

First of all you'll have your QMovingMapWithSpritesWhatever class that should 
inherit from QCanvas. You may start implementing it right away or (beter) 
make a design of it: what slots will it have, what signals will it emit, what 
properties will there be (for prop() and setProp() methods) and in what files 
will it reside. As soon as you know all the things about your class, just 
fill it in the Qt Designer's "Edit Custom Widgets" dialog. From this point on 
you can use your class as if it was a native widget (except thet there will 
be no real preview of it); connect signals from/to other widgets, set it's 
properties for the initial state etc.
This works for me very well in QtDesingner 1.1.
Good luck,
	Jacek
BTW. Make a nice pixmap for your widget, otherwise after you have three or 
more custom ones, you'll spend a lot of time hovering over the "Q" buttons 
with different colors just to get the tooltip saying which class it is.

-- 
+-------------------------------------+
|from: J.C.Wojdel                     |
|      J.C.Wojdel at cs.tudelft.nl       |
+-------------------------------------+

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list