Questions about QT Designer

Tarjei Knapstad tarjeik at chemcon.no
Thu Jan 24 09:41:56 GMT 2002


On Thu, 24 Jan 2002, Werner Modenbach wrote:

> On Mittwoch, 23. Januar 2002 21:07 Sean Murphy wrote / Am Mittwoch, 23. 
> Januar 2002 21:07 schrieb Sean Murphy:
> > This is really a QT Designer question, but I can't find a QT Designer
> > mail list.  If there is one, I apologize for asking this here, and if
> > someone could point me to the QT Designer mail list, I'd appreciate it.
> >
http://qt-interest.trolltech.com is a general purpose Qt mailing list. 
Most Qt people read it (including the Qt developers I think), so there's 
always a good chance you'll get an answer to your questions there.

> > I'm trying to create some moving map software that interfaces to a GPS
> > unit.  The GUI that I am creating will have the moving map area, and
> > some other widgets to display other information.  I've laid out what I
> > want the GUI to look like in QT Designer, except for the moving map
> > area.
> >
> > The moving map area needs to have a background pixmap, then some sprites
> > over the top of it that show where we are currently at, and where we
> > have been.  From reading some of the QT docs, it looks like I want to
> > use a QCanvas object to do this.  The problem is, what do I do in QT
> > Designer to layout the QCanvas object?  

Do keep in mind that the QCanvas is "abstract" in the sense that you can't 
visualize it directly. Inheirt QCanvasView for that.

> > There is no button (like there
> > is for a QLabel, QHBox, etc.) to create a QCanvas widget.  I saw under
> > Tools->Custom there is an "Edit Custom Widgets..." selection, but when I
> > selected that I wasn't sure what I should put in the resulting dialog
> > box.
> >
> > 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?
> >
> 
> Hi Sean,
> 
> The way I would handle this is to use a QFrame for the graphic area inside QT 
> Designer.
> Next you have to create your graphic class derived from QCanvas widget.
> Use the event routines/slots to do apropriate actions (creating and moving 
> the objects etc.). 
> Use the QFrame widget as parent of your new class , thats it. 
> To get automatic layout functionality you can use layoutclasses together with.
> 
Yeah, this is usually how it goes. When you've drawn what you can in the 
Designer, you save, inherit the class you just made, and add the rest 
manually. I tried the custom widget stuff back in 2.x but I couldn' quite 
get it to work then. Never tried since as I don't really see any need for 
it...

Cheers,
-- 
Tarjei Knapstad 


-
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