I have a QMessageBox that is too short.
I've tried various methods of increasing the height, such as resize, setMinimumHeight, setSizeIncrement + setSizeGripEnabled, but none of these attempts work. Setting SizeGrip doesn't allow me to resize the window at all.
dialog = QMessageBox(self)
dialog.setWindowTitle('About this programme')
dialog.setText('Introductory text')
dialog.setDetailedText('A bunch more text')
dialog.setMinimumHeight(500)
dialog.setSizeIncrement(1, 1)
dialog.setSizeGripEnabled(True)
dialog.show()
For reference in the picture, the window labelled Rotascript has size 360x, 370y.
What am I doing wrong, or is this some kind of bug?
Thanks in advance.

You're not doing anything wrong. The QMessageBox is notoriously difficult to resize.
Generally, people use one of three approaches:
Use setText() with newlines instead of setInformativeText()
The message box will resize with respect to the text set by the setText() method. It's hacky, but you could simply include a bunch of white space in setText().
Try overriding the layout of QMessageBox
This is includes fiddling with setFixedSize or overriding the widget's event method. Here is a good example from a related SO post.
Reimplement QMessageBox
A fundamental property of QMessageBox is that it doesn't resize. So, through backwards logic, if you want a message box which resizes, you actually don't want a message box. However, the QMessageBox inherits from QDialog. You might be able to achieve what you want by going up a level in the inheritance chain and re-implementing the features you want from a QDialog.
The following resources informed my response:
apocalyptech.com - Qt5 Resizing a QMessageBox
How to allow resizing of QMessageBox in PyQt4
How can I resize QMessageBox?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With