[Qt-interest] Problem in view
Arnold Krille
arnold at arnoldarts.de
Fri Feb 13 14:05:31 CET 2009
Hi,
On Friday 13 February 2009 13:20:44 Sujan Dasmahapatra wrote:
> Whats wrong in this can you tell me anybody ? I am trying to show a view
> on the mainwindow through newFile slot...
> MyClass::newFile {
>
> QGraphicsView* v = new QGraphicsView( this );
>
> View->show();
>
> }
If the variable is named "v" you should also call the show-function on it:
v->show()
instead of
View->show();
Unless you already have a pointer to a QGraphicsView in your class and this
pointer is named "View". But then you should also initialize this pointer with
a pointer to your new view...
Maybe you should also start by looking at the Qt tutorials and learn a bit
about objects, widgets and the usage of these.
Arnold
PS: If you want answers to your answers, don't reply off-list unless there is
good reason to do so.
-------------- 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/1462f166/attachment.bin
More information about the Qt-interest-old
mailing list