[Qt-creator] Class design of programs when QT Designer is used

Ladnar, Marc Marc.Ladnar at ksab.kroschu.com
Mon May 25 07:40:00 CEST 2009


You are not bound to that.
 
I have another big project now and what I do is following:
 
Each tab e.g. is designed in Designer as QWidget based class with all of
it's functionallity.
In MainWindow I only put the Tabwidget and promote each tab to one of
the Widget based classes.
Now you have a simple MainWindow and several obejcts doing their stuff.
 
What about this solution?
 
Even if you want to separate ui from data, you can design your ui,
create a class containing the ui and your dataclass as member, in this
class then you make the connects and brind the data to the ui.
 
Is that what you are looking for or did I understand your question
wrong?
 
Best regards,
 
Marc Ladnar

  _____  

Von: Kosta [mailto:userqt at gmail.com] 
Gesendet: Samstag, 23. Mai 2009 16:03
An: qt-creator at trolltech.com
Betreff: [Qt-creator] Class design of programs when QT Designer is used



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. :) 


__________ 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-creator-old/attachments/20090525/b12265b1/attachment.html 


More information about the Qt-creator-old mailing list