[Qt-interest] About the QTDesigner ui
Kosta
userqt at gmail.com
Sun May 24 10:56:47 CEST 2009
MessageI see...
Yes, there must be more examples for QT Designer especially now, when ti is integrated in QT Creator.
Is there a tutorial or something where the above is described ?
----- Original Message -----
From: Tony Rietwyk
To: qt-interest at trolltech.com
Sent: Sunday, May 24, 2009 4:54 AM
Subject: Re: [Qt-interest] About the QTDesigner ui
Kosta wrote:
Hi,
I was wondering about the ui variable generated by the Designer. I have been thinking, what if your UI is big. In the Designer, it's separated in tabs for example, but at the end the only thing you do is... just create a widget and call the setupUI method to put ALL into this widget.
What do you think about it ?
I'm working on a project right now, and I am thinking how to implement all in object-oriented way, while my whole ui is actually in my MainWindow widget and ui variable.
Also it seems I can only auto-connect slots in the widget to which setupUI is called. Maby I should put all the methods in this class ?
In almost all examples QT Designer is not used and the objects are quite clear and consistent. And now everything is in one place. :)
Or I'm missing something, I'm new to QT and C++ and I am a little bit confused now. :)
You do not need to define everything in the one Designer form - especially tabs. You can copy the contents of each tab into separate ui files based on QWidget, then create and add them at run-time - either all in the constructor (after ui.setupUi), or even as required. You may need to adjustSize on the main Window, after creating your tab widgets.
In the generated UI files, you will see a call to connectSlotsByName - this is what does the auto-connect. You can call it too - but you cannot call it twice, because Qt is not smart enough to have a public method to ask whether the connect has already been done!
It's a shame there aren't more examples that use designer.
Regards,
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
------------------------------------------------------------------------------
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090524/35d5670b/attachment.html
More information about the Qt-interest-old
mailing list