[Qt-interest] Basic QGraphicsview question
Ankit Agarwal
ankit17.ag at gmail.com
Fri Dec 12 06:01:18 CET 2008
Hello Phil,
You need to use setScene() function. It isn't addScene(). Sorry for the
mistake.
On Fri, Dec 12, 2008 at 9:22 AM, Phil <phillor at telstra.com> wrote:
> On Thursday 11 December 2008 14:34:08 Ankit Agarwal wrote:
> > If you have already created the GraphicsView, as you say, then for adding
> a
> > scene to it, you just need to call addScene() funtion through that
> pointer
> > and pass the scene's instance.
> >
> > QGraphicsScene *scene = new QGraphicsScene();
> > graphicsView->addScene(scene);
> >
>
> Thank you for your help so far Ankit, however, we're still not quite there
> yet.
>
> kde4test.cpp:53: error: 'class QGraphicsView' has no member named
> 'addScene'
>
> This is what I first tried but of course that doesn't work either.
>
> graphicsView(scene, centralwidget);
>
> kde4test.cpp:45: error: '((kde4test*)this)-
>
> >kde4test::<anonymous>.Ui::MainWindow::<anonymous>.Ui_MainWindow::graphicsView'
> cannot be used as a function
>
> --
> Regards,
> Phil.
>
--
Regards,
Ankit Agarwal
SW Engineer
Vegayan Systems
email : ankit_agarwal at vegayan.com
Blog : http://ankit17.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081212/b4dda878/attachment.html
More information about the Qt-interest-old
mailing list