[Qt-interest] two interfaces: gui, cl, inherit a QObject
Gabriele Kahlout
gabriele at mysimpatico.com
Wed May 19 16:14:56 CEST 2010
>
> > I'm trying to have a ui Q_Object base that defines signals and slots both
> > of my Window and CLInterface classes inherit, and re-implement.
> > Window also needs to inherit QDialog. Yet I cannot, inherit from two
> > qobjects. What do you suggest doing in this common scenario?
>
> 1). We have no idea what you are trying to achieve from that description.
> Please be more specific
>
Problem:
Functionality provided by the system: X, Y.
Interfaces to the system: GUI, CL.
> 2). You design sounds like a mess. Try listing your requirements and the
> decomposing your system into classes with well-defined scopes. from the
> above
> it sounds like you want a class that does everything threading, dialogs,
> command line interface.
>
Solution:
UI base class of CL and GUI.
UI signals: X, Y
Controller object instantiates a GUI or CL, depending on deployment/user
choice. It then binds the signals of the instantiated ui class to slots that
perform functionality.
Is this poor design, with signals and slots? If so, please outline, as I've
outlied mine above, your better solution.
> > Any readyRead to stdin to avoid the thread, Thiago?
>
> 3). Thiago is not your slave. This is a list of volunteers.
>
I've directed the question to Thiago, not to suggest any slavery relation,
but following a long discussion between us two, about achieving threads
behavior with signals and slots. I signalled a reference to our previous
discussion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100519/68fabe7a/attachment.html
More information about the Qt-interest-old
mailing list