QOpenGLWidget displays black screen
Can you please post what's reported by Help->System Information... dialog? Use the Copy to Clipboard button
Seems like a minor bug to me, what's the behavior if you set back the main screen to laptop with Windows(instead of unplugging HDMI cable)?
Thank you!
If I use win+P to set it to the main screen to laptop only, a black screen will also appear.
Looking forward to your reply!
I captured the event using QAbstractNativeEventFilter, but I haven’t found a suitable way to reconnect the context later. Thanks! bool nativeEventFilter(const QByteArray& event_type, void* message, long* result) { #ifdef Q_OS_WIN if (event_type == "windows_generic_MSG") { MSG* msg = reinterpret_cast<MSG*>(message); if (msg->message == WM_DISPLAYCHANGE) { QMetaObject::invokeMethod(this, "SlotDisplayChanged", Qt::QueuedConnection); } } #endif }
I fixed the issue by recreating a new Aspect_NeutralWindow(). Thanks!
That's good news you could fix this issue. Can you share your changes with a pull request to Mayo project? Maybe this will be helpful to the users, thanks!
Have the same problem. On Friday I used Mayo to show a file. Then left the PC. Now I came back and the screen is black.
It seems only a temporary problem. I could open other files that works flawless beside this file and if I close it and reopen it also appear correct again. I assume that either standby mode or another influence has caused the problem.