[Qt-interest] Basic QGraphicsview question
Ankit Agarwal
ankit17.ag at gmail.com
Sat Dec 13 05:01:24 CET 2008
Hi Phil,
I think that you need to add some item on the scene to be able to see if the
scene is added or not.
On Fri, Dec 12, 2008 at 10:26 AM, Phil <phillor at telstra.com> wrote:
> On Friday 12 December 2008 16:01:18 Ankit Agarwal wrote:
> > Hello Phil,
> > You need to use setScene() function. It isn't addScene(). Sorry for the
> > mistake.
> >
> No need to be sorry Ankit, I probably should be sorry for asking such a
> basic
> question.
>
> At the risk of being jumped on, the following compiles but doesn't show
> anything in the graphics view box. "graphicsView" is a pointer generated by
> Designer and the graphics view sits on the main window dialog.
>
> QGraphicsScene scene;
>
> scene.addText("Hello, world!");
>
> graphicsView->setScene(&scene);
>
> graphicsView->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/20081213/bc05c169/attachment.html
More information about the Qt-interest-old
mailing list