[Qt-interest] object derived from qgraphicsItem and QMessageBox?
Srdjan Todorovic
todorovic.s at googlemail.com
Tue Oct 27 10:44:32 CET 2009
Hi,
On 27/10/2009, Riccardo Roasio <riccardo.roasio at gmail.com> wrote:
> QMEssageBox permit to wait until the user take a decision and click on a
> button..but it has its own interface...
Which interface is that?
That's just a modal dialog - you can easily create one yourself
without being confined to QMessageBox.
> I would like to modify its interface to be similar to the one used in the
> rest of the program... this is why i thinked about subclassing QMessageBox
> and QGraphicsItem..to use QGRaphicsItem funcitonality to paint on the
> screen...
Why?
Do you have a collection of messagebox objects and your new
graphics-item-message-boxes and want to treat them all the same using
polymorphism?
Would anyone ever create a whole bunch of QMessageBox objects and keep
them in a list for a long time? (I thought the point of QMessageBox
was that it's a throw-away object - you create it, show it, get
response from user, then you delete it).
I don't know what exactly you are doing, but it seems like a
code/design smell (unless I have completely misunderstood you).
Regards,
Srdjan
More information about the Qt-interest-old
mailing list