[PyQt] Issue with OpenGL widget in MDI area with hidden toolbar
Thomas Robitaille
thomas.robitaille at gmail.com
Wed Oct 12 16:19:34 BST 2016
Hi all,
The following example shows what happens if I create a QMainWindow,
add a toolbar and hide it, then add an OpenGL widget to an MDI area:
from PyQt5 import QtWidgets, QtOpenGL
qtapp = QtWidgets.QApplication([''])
viewer = QtOpenGL.QGLWidget()
viewer.resize(600, 600)
viewer.makeCurrent()
main = QtWidgets.QMainWindow()
tbar = QtWidgets.QToolBar()
main.addToolBar(tbar)
tbar.hide()
mdi = QtWidgets.QMdiArea()
main.setCentralWidget(mdi)
sub = QtWidgets.QMdiSubWindow()
sub.setWidget(viewer)
mdi.addSubWindow(sub)
sub.resize(600, 600)
main.show()
qtapp.exec_()
The result is the attached screenshot qt5_screenshot1.png. If I do not
hide the toolbar, I don't get the weird gray overlay rectangle
(qt5_screenshot2.png). Is this a bug, and if so, how do I report it?
Does anyone have any suggested workarounds?
Thanks!
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt5_screenshot1.png
Type: image/png
Size: 204360 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161012/f6134fec/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt5_screenshot2.png
Type: image/png
Size: 208884 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161012/f6134fec/attachment-0003.png>
More information about the PyQt
mailing list