[Qt-interest] QGLWidget not playing nicely with others on the Mac

Bob Hood bhood2 at comcast.net
Sun Feb 28 19:56:51 CET 2010


Clinton Stimpson wrote:
> On Thursday 25 February 2010 02:37:45 pm Bob Hood wrote:
>   
>> I have both QTreeWidget and QGraphicsView widgets that I open in a
>> frameless window (Qt::FramelessWindowHint) in a GUI that contains one or
>> more QGLWidgets "viewports" active in the window.  I need these
>> Tree/GraphicsView widgets to appear over the top of the QGLWidgets while
>> they are visible, and they do so without issue under Windows and Linux.
>>
>> However, the Mac isn't playing nicely.  The QGLWidgets remain at the top
>> of the child widget order, even though I'm using QWidget::setFocus(),
>> QWidget::raise() and setting the Qt::WindowStaysOnTopHint window flag on
>> the Tree/GraphicsView widgets.
>>
>> Anybody know how I can get the Mac not to "think different" in this case?
>>     
>
> Sounds like a bug.  It may not be considering those windows when setting 
> AGL_CLIP_REGION.
> As a workaround could make these widgets with a NULL parent.
>   

Unfortunately, this removes the Widget from the main window, placing it
into a stand-alone window.  This destroys the effect I'm after, that of
a "drawer" sliding open from the border of the main window to preset
some data, and then sliding closed when the user is done with it
(triggered by a loss of focus).

I can't seem to overcome the prominence of the QGLWidget on the main
window.  No amount of lower() on it (or raise() on the overlay widget)
will make it behave as expected.  Since this is so different on the Mac,
I'm guessing there something in the operating system that is unfairly
giving this widget overlay priority.

Has nobody else experienced this platform-specific behavior?




More information about the Qt-interest-old mailing list