[Qt-interest] Optionally deriving from QWidget

Jonathan Greig redteam316 at gmail.com
Fri Sep 16 08:48:25 CEST 2011


Alex approach of two classes is the best solution.

- Swyped from my droid.

On Sep 16, 2011 12:56 AM, "Andre Somers" <andre at familiesomers.nl> wrote:

Op 15-9-2011 23:32, David Doria schreef:

> I have a class that emits Qt signals. I want to use this class in two
> ways:
>
> 1) Interactive ...
I would choose a different approach:
1) Create a static library that contains all the business logic. This
will be the heart of the application, but does not contain UI.
2) Create a thin application that uses this lib, and that provides the
commandline version of the interface.
3) Create a simple GUI application that also uses the same lib, and that
only provides the interactive UI.

I think that would be a much clearer code structure. It will saves you
lots of hard to read #ifdefs.

André
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110916/52fc2a28/attachment.html 


More information about the Qt-interest-old mailing list