Nominate our 2022 Qt Champions!

QPrintDialog::exec returns QDialog::Rejected immediatly in Windows, not in Lubuntu

  • I wrote a simple example program for QPrinterDialog:

    void QtDialog::on_button_clicked()
    QPrinter printer;

    const boost::shared_ptr<QPrintDialog> print_dialog(
    new QPrintDialog(&printer));
    if (print_dialog->exec() != QDialog::Accepted)

    Under the Linux distribution Lubuntu this works as expected. When crosscompiling the code with MXE to Windows, QPrintDialog::exec returns QDialog::Rejected immediatly when running it with Wine.

    1. Who has an idea what causes QPrintDialog::exec to return QDialog::Rejected immediatly?
    2. Is the problem in (a) Qt5 (b) the MXE crosscompiling environment (c) Wine. If (b) or (c), sorry for posting at the wrong forum :)

    Linux distribution: Lubuntu 13.04 (raring)
    IDE: Qt Creator 2.7.0
    C++ standard: C++98
    Compiler (Lubuntu): G++ 4.7.3
    Compiler (MXE): G++ 4.8.1
    Libraries used (Lubuntu): Qt: version 5.0.1 (32 bit)
    Libraries used (MXE): Qt: version 5.0.1 (32 bit)
    Wine: 1.4.1

    Full code and project download at . I would be curious if the code would work well under native Windows...

Log in to reply