[Qt-interest] Basic QGraphicsview question
Ankit Agarwal
ankit17.ag at gmail.com
Thu Dec 11 04:34:08 CET 2008
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);
On Thu, Dec 11, 2008 at 7:57 AM, Phil <phillor at telstra.com> wrote:
> Thank you for reading this.
>
> I've created a main window with Designer that includes a graphics view.
> Designer allocates a pointer to that graphics view called graphicsView.
>
> Try as I may, I cannot see how to use that pointer in the following example
> code in place of "view".
>
> QGraphicsScene scene;
> scene.addText("Hello, world!");
>
> QGraphicsView view(&scene);
> view.show();
>
> --
> Regards,
> Phil.
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
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/20081211/f5b9a356/attachment.html
More information about the Qt-interest-old
mailing list