[SOLVED]Android: QPrintDialog support



  • I'm working on deploying my desktop application to Android. Qt 5.1.0 failed to build that application because of QPrintDialog issue. How can fix this issue?

    [code]nclude/QtSql -I../../../../../../.Qt5.1.0/5.1.0/android_armv7/include/QtGui -I../../../../../../.Qt5.1.0/5.1.0/android_armv7/include/QtCore -Itmp -Itmp -I../../../../../../.Qt5.1.0/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/include -I../../../../../../.Qt5.1.0/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I../../../../../../.Qt5.1.0/android-ndk-r8e/platforms/android-14/arch-arm/usr/include -I. -o tmp/mqledit.o ../../../src/openrpt/MetaSQL/mqledit.cpp
    ../../../src/openrpt/MetaSQL/mqledit.cpp: In member function 'virtual void MQLEdit::filePrint()':
    ../../../src/openrpt/MetaSQL/mqledit.cpp:229:3: error: 'QPrintDialog' was not declared in this scope
    ../../../src/openrpt/MetaSQL/mqledit.cpp:229:16: error: expected ';' before 'printdlg'
    ../../../src/openrpt/MetaSQL/mqledit.cpp:230:7: error: 'printdlg' was not declared in this scope
    make[2]: Leaving directory /home/mbnoimi/Projects/Desktop/Simple Invoice/build-SimpleInvoice-Android_for_arm_GCC_4_7_Qt_5_1_0-Release/openrpt/MetaSQL' make[2]: *** [tmp/mqledit.o] Error 1 make[1]: Leaving directory/home/mbnoimi/Projects/Desktop/Simple Invoice/build-SimpleInvoice-Android_for_arm_GCC_4_7_Qt_5_1_0-Release/openrpt'
    make[1]: *** [sub-MetaSQL-make_first-ordered] Error 2
    make: *** [sub-openrpt-make_first-ordered] Error 2
    10:43:30: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project SimpleInvoice (kit: Android for arm (GCC 4.7, Qt 5.1.0))
    When executing step 'Make'
    10:43:30: Elapsed time: 00:50.[/code]

    P.S. I'm working on deploying this project https://github.com/mbnoimi/SimpleInvoice


  • Moderators

    i'm afraid you will have to exclude print support when you are building for android (since it's not supported and doesn't make sense either). For example use the macros Qt provides to detect the target OS on compile time.



  • Thanks,

    [quote]i’m afraid you will have to exclude print support [/quote]
    I realized that but I face problem with Qt macros in this thread: https://qt-project.org/forums/viewthread/31906


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.