Possible Error in Qt or PyQT5 , minimumSize() returns 2^24-1



  • I am learning PyQt5 and have experienced this error in several different examples from around the net. I am using a very recent build of Qt and PyQt5 (as of 14 days ago).

    This example provided by PyQt here is one that fails:
    https://github.com/baoboa/pyqt5/blob/master/examples/layouts/borderlayout.py

    first, it generates this error:
    Gtk-CRITICAL : IA__gtk_widget_style_get: assertion 'GTK_IS_WIDGET (widget)' failed
    I have tried the standard fix of inserting this after app is created:
    app.setStyle('plastique')
    That doesn't work.

    I have been getting this error in many of the PyQt5 examples around the net (almost
    always on text boxes), but it usually does not affect functionality.

    In the example above, things start to go horribly wrong on line 180. This is what my debugger tells me:

    '>>>wrapper.item.minimumSize()'
    PyQt5.QtCore.QSize(16777215, 16777215)
    '>>>wrapper.item.widget()'
    <PyQt5.QtWidgets.QTextBrowser object at 0x7f60492c7af8>
    '>>>2**24'
    16777216

    It looks to me like somewhere inside of the class, a signed 24 bit value of -1 is turned into
    an unsigned value of 16777215. Needless to say, it effectively crashes my entire system.

    Is this the right place to report this?

    Thanks a bunch


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Nope, you're on the wrong forum. PyQt is developed by Riverbank here

    Note that that value reminds me of QWIDGETSIZE_MAX


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.