[Qt-interest] Problem in creating a view
Arnold Krille
arnold at arnoldarts.de
Fri Feb 13 12:27:25 CET 2009
On Friday 13 February 2009 11:52:21 Sujan Dasmahapatra wrote:
> When I am trying to create a mdi application and in the newFile slot I
> create a QGraphicsView but when I execute the program the view is
> appearing and instantly going off......what could be the problem...???
To be able to do anything more then guessing a bit of code or at least a bit
more explanation would be nice.
My guesses:
1) You quit the app as soon as it starts:-)
2) Your app crashes as soon as it starts:-) :-)
3) You create the view on the stack (or was it the heap, I can't remember) by
something like "QGraphicsView v( this );" which deletes the view as soon as
the variable goes out of scope (which would be the end of the function. Create
it with "QGraphicsView* v = new QGraphicsView( this );" and it lives as long
as you don't delete it or its parent widget.
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090213/c9566905/attachment.bin
More information about the Qt-interest-old
mailing list