[Qt-interest] Designing Qt applications

Jason H scorp1us at yahoo.com
Mon Aug 23 20:26:18 CEST 2010


Well, it should come naturally.

Basically, you want a MVC-style approach (NOT MFC!). The MVC approach will 
naturally be reinforced by your use of QtTest. And/or QtQuick. And or QtWebKit.

So you want your application logic separated from your UI (controller/view 
separation). While it is a requirement that they interact, the business logic 
functions should be reusuable if you go with a conventional Qt GUI, them migrate 
to QtQuick, and/or QtWebKit. QtTest will come in and hook into your business 
logic so you can unit test your business logic as well. 


This means, in C++ terms, your UI slots should be calling static methods of a 
class. Or, less optimally but equally valid, a regular class (if you have to 
maintain state information). Then your UI is completely replaceable, be it 
local, web, or QML driven.

As for the M (model) part, that is likely to be the same because it is 
determined by your application's data structure. 







________________________________
From: Markus Franke <Franke.M at sebakmt.com>
To: qt-interest at trolltech.com
Sent: Mon, August 23, 2010 8:50:52 AM
Subject: [Qt-interest] Designing Qt applications


Dear all, 

is there any document on the web which deals with Qt application design in 
general?  


I have been working with Qt for almost 2 years now and I know how to get things 
working.  

However, especially the separation of GUI code and application logic is 
sometimes not so easy to handle. Usually there are different ways which one can 
follow but I am pretty much sure that there must be also a prefered way how to 
do. ;-) 


Thanks for any comments on this, 
Markus


"Disclaimer: This message is intended only for the use of the individual or 
entity to
which it is addressed and may contain information which is privileged, 
confidential, proprietary,
or exempt from disclosure under applicable law. If you are not the intended 
recipient or the person
responsible for delivering the message to the intended recipient, you are 
strictly prohibited from
disclosing, distributing, copying, or in any way using this message. If you have 
received this 

communication in error, please notify the sender and destroy and delete any 
copies you may have
received."


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100823/07007951/attachment.html 


More information about the Qt-interest-old mailing list