[Qt-interest] Display and use QWidgets inside QGraphicsView and/or QGLWidget

Andrea Franceschini therealmorpheu5 at gmail.com
Tue Mar 3 14:22:46 CET 2009


2009/3/3 Sean Harmer <sean.harmer at maps-technology.com>:
> On Tuesday 03 March 2009 11:40:04 Andrea Franceschini wrote:
>> I assume that I could simply request a borderless/titlebarless QDialog
>> and to the same things but it would be a lot cleaner if I could simply
>> use QWidgets.
> Yes this is possible via the QGraphicsView widgets-on-canvas framework and
> it's good fun too ;-) After all a QDialog is a QWidget.

Sure it is :)

But now I'm stuck by my ignorance on another aspect: I was going for a
very simple approach in which I just created a QGLWidget derived
widget, assigned a painter helper to it and called show() as seen in
an example in the docs. Now it seems that I'm not able to port my
application to the QGraphicsView thing. I do everything I was already
doing (except for calling show() on the QGLWidget), I assign this
widget as a viewport to the QGraphicsView, set all the relevant things
such as sizes etcetera, then call show() on the graphicsview and...
nothing, the thing comes up but nothing is (re)drawn.

Hints?
-- 
Andrea



More information about the Qt-interest-old mailing list