[Qt-interest] Basic QGraphicsview question

Phil phillor at telstra.com
Fri Dec 12 04:52:14 CET 2008


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.



More information about the Qt-interest-old mailing list