- 
    Bug 
- 
    Resolution: Unresolved
- 
    P2: Important 
- 
    None
- 
    5.9.8, 5.12.6, 5.13.2, 5.14.0
- 
    None
Following piece of code can't set windowTitle on a QMessageBox on IOS:
auto box = new QMessageBox(this); box->setWindowTitle("Title"); box->setText("Description"); box->show();
But this one works:
auto box = new QMessageBox(this); box->QWidget::setWindowTitle("Title"); box->setText("Description"); box->show();
The problem is simple. You can see the problematic line below, the usage of Q_OS_MAC (which corresponds to Q_OS_DARWIN). Using Q_OS_MACOS instead would solve the problem:
qtbase/src/widgets/dialogs/qmessagebox.cpp:2610:
void QMessageBox::setWindowTitle(const QString &title) { // Message boxes on the mac do not have a title #ifndef Q_OS_MAC // ->>>>> Problem here QDialog::setWindowTitle(title); #else Q_UNUSED(title); #endif }
Tested on iOS Simulator, you can see the attached images.
- is duplicated by
- 
                    PYSIDE-1833 Title does not show on QMessageBox on mac -           
- Closed
 
-         

