Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Reimplemented QOpenGLWidget shows under QStackedWidget.



  • Hi. There's QStackedWidged which stacks QMainWindows, some of them parents reimplementations of QOpenGLWidget, everything shows fine when i try do display them "standalone" , but purpose is to stack window to navigate them next-prev. When I manage those windows by QStackedWidget, whole QMainwindow including parented QOpenGLWidget is dislpayed underneath all rastered content, attributes like ALWAYSSTACKONTOP seems to not work with stacked structure, when I "unparent" opengl content - it shows correctly, but then I must reproduce background because then opengl windows display opacite content, this affects performance , framerate decreases about 10-20% when i reproduce underlaying background of containing QStackedWidget in opengl paingGL() .
    in fact - I found strange solution - it removes consequence but doesnt resolve problem, after showing window with parented qopenglwidgets i provide this code:
    <code>
    QMainWindow* mw=new QMainWindow(currentWidget());
    mw->setFixedSize(1,1);
    mw->showFullScreen();
    update();
    mw->hide();
    mw->deleteLater();
    </code>
    after that window appears on top. The issue appears on Android-compiled, IOS has not this issue. Maybe someone has some experience with that issue?


  • Lifetime Qt Champion

    Hi,

    Can you show a picture of what you get ?



  • @SGaist sorry, but I'm not allowed, it look like ALWAYSSTACKONTOP attribute is rejected, all OPENGL content is stored under all rastered content.. thanks :)



  • @pcman11 said in Reimplemented QOpenGLWidget shows under QStackedWidget.:

    @SGaist sorry, but I'm not allowed, it look like ALWAYSSTACKONTOP attribute is rejected, all OPENGL content is stored under all rastered content.. thanks :)

    it looks like platform-dependent specific issue, because it's only android's problem. i deducted that when last-child is openglwidget problem persists, but if last parented is raster widget-it content appears on top


Log in to reply