Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
6.5.1
-
None
Description
Qt is cross-platform, i.e. largely platform independent. This is also stated on the website and it should be true for the normal widgets (e.g. QWidgets).
I'm using QMessageBox to inform my users about certain things. However, QMessageBox does not behave cross-platform. It behaves completely different on MacOS as opposed to Windows (and Linux). See here two samples of QMessageBox behaviour on Windows and MacOS:
Windows | MacOS |
---|---|
![]() |
![]() |
This is not what I'd expect as 'cross-platform'. Worse, I've got QMessageBox'es with even more text and on MacOS the width stays the same and it starts displaying a scroll bar, and also the formatting that I had used is completely removed.
So I had to create a 'zcMsgBox' class that replaces QMessageBox, which, I think, should not have been necessary. See below the output on Windows and MacOS of my zcMsgBox class:
Windows | MacOS |
---|---|
![]() |
![]() |
This is what I expected in the first place.
I think this is a bug. One cannot trust Qt to be cross-platform when using QMessageBox, while it should behave the same on all platforms.
I see a related bug: https://bugreports.qt.io/browse/QTBUG-111803.
Of course one would want some native dialogs, like "File Open Dialogs", etc. But I don't think this one is OK. I'd rather would want to enable native QMessageBox dialogs with a separate switch, than disabling al native dialogs together with a switch.