[Qt-interest] object derived from qgraphicsItem and QMessageBox?
Riccardo Roasio
riccardo.roasio at gmail.com
Tue Oct 27 11:57:26 CET 2009
So i can create a modal dialog also using QGraphicsItem?
I would use a QMessageBoxLike item as it is, so create it, retrieve user
input and destroy it...
Riccardo
2009/10/27 Srdjan Todorovic <todorovic.s at googlemail.com>
> 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
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091027/03148879/attachment.html
More information about the Qt-interest-old
mailing list