Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0
-
Windows 10 22H2, MSVC 2019 x64, MinGW 11.2 x64
-
8c0b657c9 (dev), d397fee62 (6.5)
Description
Code
#include <QApplication> #include <QMainWindow> #include <QOpenGLWidget> int main(int argc, char *argv[]) { QApplication app(argc, argv); app.setAttribute(Qt::AA_NativeWindows); QMainWindow w; w.setCentralWidget(new QOpenGLWidget); w.menuBar()->addAction("Hello"); w.show(); return app.exec(); }
Outcomes
The menu bar text does not appear. The debug output shows the following messages at startup, as well as every time you move your mouse cursor over the menu bar where the text is meant to be:
QOpenGLContext::makeCurrent() called with non-opengl surface 0x19699b03180 QRhiGles2: Failed to make context current. Expect bad things to happen.
Notes
- The problem doesn't occur if QMenuBar::addAction() is not called
- The problem doesn't occur if Qt::AA_NativeWindows is removed
Attachments
Issue Links
- is duplicated by
-
QTBUG-113557 Raster native widget fail to draw when there is a quick widget sibling
- Closed