[PyQt] QDialog (and others) not resizing on PyQt 5.10.1 PIP install

Hans-Peter Jansen hpj at urpla.net
Tue Mar 20 16:08:43 GMT 2018


On Dienstag, 20. März 2018 10:30:10 Marko Luther wrote:
> Hm. Still wondering on this. Nobody else seeing this issue with PyQt 5.10.1
> on Mac OS X?
> 
> Here is a simplified (trivial) scriopt that just opens a QDialog which is
> resizable under PyQt 5.10.0, but not under PyQt 5.10.1, running from a pip
> install on Python 3.5 as well as Python 3.6 on Mac OS X.
> 
> Seems to be an issue only on Mac OS X.

I can confirm this behaviour on macOS 10.12. pip3 install PyQt5 shows this 
issue, while pip3 install PyQt5==5.10 doesn't (Python 3.6.4).

The Qt tests are still relevant.

Cheers,
Pete 

> Thanks for every hint on this,
> Marko
> 
> --
> from PyQt5 import QtCore, QtGui, QtWidgets
> 
> class PreviewWindow(QtWidgets.QDialog):
>     def __init__(self, parent=None):
>         super(PreviewWindow, self).__init__(parent)
>         self.textEdit = QtWidgets.QTextEdit()
>         self.textEdit.setReadOnly(True)
>         self.textEdit.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
>         closeButton = QtWidgets.QPushButton("&Close")
>         closeButton.clicked.connect(self.close)
>         layout = QtWidgets.QVBoxLayout()
>         layout.addWidget(self.textEdit)
>         layout.addWidget(closeButton)
>         self.setLayout(layout)
>         self.setWindowTitle("Preview")
> 
> if __name__ == '__main__':
>     import sys
>     app = QtWidgets.QApplication(sys.argv)
>     preview = PreviewWindow()
>     preview.show()
>     sys.exit(app.exec_())
> --
> 
> > On 7. Mar 2018, at 20:49, Marko Luther <marko.luther at gmx.net> wrote:
> > 
> > Dear Hans,
> > 
> >> On 7. Mar 2018, at 20:35, Hans-Peter Jansen <hpj at urpla.net> wrote:
> >> 
> >> On Dienstag, 6. März 2018 11:09:35 Marko Luther wrote:
> >>> Mac OS X 10.13.3 , Python 3.5.4, Qt 5.10.1 / PyQt 5.10.1 installed via
> >>> PIP
> >>> "PyQt5" With the attached script resizing works for Windows, but not for
> >>> any other of the options incl. QDialog.
> >>> 
> >>> I downgraded to PyQt 5.10.0 and with the same code the QDialog resizes
> >>> again as expected.
> >>> 
> >>> Any idea? Is this a Qt problem?
> >> 
> >> Do I understand this correctly, you downgraded PyQt, but kept the Qt
> >> version?> 
> > No, I actually uninstalled the PIP PyQt package with the included Qt and
> > am running now PyQt/Qt 5.10.0 that works.> 
> >> And you're not using any hints, just switch the type?
> > 
> > Yes.
> > 
> >> Fiddling with these hints _is_ awful, since they're handled in different
> >> os
> >> levels, some by Qt itself, some below, and they're highly system
> >> dependent.
> > 
> > I did not wanted to fiddle with the. Just hope they would somehow make my
> > dialogs resizable again. But they didn't.> 
> >> On Linux (KDM), all types are resizable, but Popup, Tooltip and Splash.
> >> 
> >> Python: 3.4.5
> >> Sip: 4.19.7
> >> Qt5: 5.10.0
> >> PyQt5: 5.10
> > 
> > On Qt 5.10.0 PyQt 5.10 all my dialogs are resizable too. However, with the
> > upgrade to 5.10.1 Qt/PyQt installed from PIP, they stopped to do so.
> > Thanks for testing anyhow. Wonder why no one else is having this issue.
> > Strange.
> > 
> > M
> > 
> >> Cheers,
> >> Pete
> >> _______________________________________________
> >> PyQt mailing list    PyQt at riverbankcomputing.com
> >> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
> > 
> > _______________________________________________
> > PyQt mailing list    PyQt at riverbankcomputing.com
> > https://www.riverbankcomputing.com/mailman/listinfo/pyqt
a


More information about the PyQt mailing list