Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPrintDialog::exec returns QDialog::Rejected immediatly in Windows, not in Lubuntu
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    richelbilderbeek
    wrote on last edited by
    #1

    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)
    {
    return;
    }
    }
    @

    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 http://richelbilderbeek.nl/CppQPrintDialogExample1.htm . I would be curious if the code would work well under native Windows...

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved