'QInputDialog' has not been declared - embadded development
-
wrote on 14 May 2018, 13:26 last edited by
Hi All,
Details/Scenario:
I am developing qtopia widget application that required user selection at a point. The main target is during the user selection I want my application code afterwards should be paused until user selects or cancels the provided option.Testing:
I tried to create widget2 and set is using setCentralWidget() resulting ui is changed but the next remaining code also executed.
Issue:
I searched and found that I should use QInputDialogue class to achieve my target. I create the code and include the header file but I am getting error : 'QInputDialog' has not been declaredIf anybody can help me to solve this issue or any alternative to achieve my target scenario.
Thanks
Kashif -
Hi,
What version of Qt are you using ?
On what platform ? -
wrote on 15 May 2018, 03:53 last edited by
Might be obvious but did you actually include it?
#include <QInputDialog>
Also, this is something you would need for any GUI, but make sure you have
QT += widgets
in your qmake. -
Might be obvious but did you actually include it?
#include <QInputDialog>
Also, this is something you would need for any GUI, but make sure you have
QT += widgets
in your qmake.wrote on 15 May 2018, 04:48 last edited byHi @ambershark,
I have included using both ways:
#include <QInputDialog> #include <QtGui/QInputDialog>
I am not using qmake but using make file to use cross compiler provided by the device vendor and it does not contains any configurations, whereas my configurations are placed inside project file (qbuild.pro).
QT += widgets
This configuration is not defined in ".pro" file but all widgets (gui) including text label, input line, command buttons are working fine in my application.
Thanks
-
Hi @ambershark,
I have included using both ways:
#include <QInputDialog> #include <QtGui/QInputDialog>
I am not using qmake but using make file to use cross compiler provided by the device vendor and it does not contains any configurations, whereas my configurations are placed inside project file (qbuild.pro).
QT += widgets
This configuration is not defined in ".pro" file but all widgets (gui) including text label, input line, command buttons are working fine in my application.
Thanks
wrote on 15 May 2018, 05:26 last edited by ambershark@Kashif Ok, can we see the actual build output?
Also you can check on your embedded device if you actually have the QInputDialog file. Most embedded devices are linux, so you should be able to use the command
find /path/to/your/qt -iname "qinputdialog"
and see if it actually exists in the Qt installed on your target system.The actual build output and possibly the code file where you try to create the object would be helpful.
Also, if you could answer @SGaist 's questions from above that would help too.
Oh and sharing the build Makefile may help too, and your qbuild.pro file.
-
@Kashif Ok, can we see the actual build output?
Also you can check on your embedded device if you actually have the QInputDialog file. Most embedded devices are linux, so you should be able to use the command
find /path/to/your/qt -iname "qinputdialog"
and see if it actually exists in the Qt installed on your target system.The actual build output and possibly the code file where you try to create the object would be helpful.
Also, if you could answer @SGaist 's questions from above that would help too.
Oh and sharing the build Makefile may help too, and your qbuild.pro file.
wrote on 15 May 2018, 05:54 last edited byHi @ambershark,
Following is the result of find command:
gmx@GMX-SDK:~$ sudo find / -iname "qinputdialog" /usr/include/qt4/QtGui/QInputDialog /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog gmx@GMX-SDK:~$
I am unable to upload/attach any file anyways, MakeFile Contents:
CROSS_COMPILE?=$(shell gmx-sdk-cross-compile) NAME:=$(shell basename `pwd`) TARGET:=$(NAME) SRCS:=$(wildcard *.c) $(TARGET): $(SRCS) $(CROSS_COMPILE)gcc -o $@ $< -Wall -Werror -lrt deploy: $(TARGET) scp $(TARGET) root@sk:/usr/bin test: deploy ssh root@sk $(NAME) clean: rm -f $(TARGET)
quild.pro contents:
TEMPLATE = app #This is the (name+version) for final product #version date : 20171103 TARGET = QR_EFT_01.07 CONFIG += qtopia #CONFIG += qtopia debug #LIBS += -lOemDecode -lrpc -lbluetooth -lytprinter -lcurl -lgps -lytlibs LIBS += -lrpc MODULES *= qtopiacomm # These are the source files that get built to create the application FORMS = # These are the defines to control functionality in application during compilation #DEFINES += MAKE_CTLS += MAKE_TOPUP MAKE_SMARTINIT DEFINES += MAKE_EMV MAKE_SPDH DBGTRACE #QT += xml HEADERS = \ Sources/Common/Data/struct.h \ Sources/Common/Txn_flow/transdef.h \ Sources/Isc_OS/DbgTrace.h \ ... SOURCES = \ gprs_connect.cpp \ main.cpp \ Sources/Common/Txn_flow/funct2.cpp \ Sources/Common/Data/appdata.c \ Sources/IscSDK/utllib.c \ ... OTHER_FILES += \ Sources/Isc_OS/equates.inc #include for beeper LIBS += -lQtMultimedia INCLUDEPATH += /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/
I have already replied to SGaist.
Thanks
-
Hi @ambershark,
Following is the result of find command:
gmx@GMX-SDK:~$ sudo find / -iname "qinputdialog" /usr/include/qt4/QtGui/QInputDialog /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog gmx@GMX-SDK:~$
I am unable to upload/attach any file anyways, MakeFile Contents:
CROSS_COMPILE?=$(shell gmx-sdk-cross-compile) NAME:=$(shell basename `pwd`) TARGET:=$(NAME) SRCS:=$(wildcard *.c) $(TARGET): $(SRCS) $(CROSS_COMPILE)gcc -o $@ $< -Wall -Werror -lrt deploy: $(TARGET) scp $(TARGET) root@sk:/usr/bin test: deploy ssh root@sk $(NAME) clean: rm -f $(TARGET)
quild.pro contents:
TEMPLATE = app #This is the (name+version) for final product #version date : 20171103 TARGET = QR_EFT_01.07 CONFIG += qtopia #CONFIG += qtopia debug #LIBS += -lOemDecode -lrpc -lbluetooth -lytprinter -lcurl -lgps -lytlibs LIBS += -lrpc MODULES *= qtopiacomm # These are the source files that get built to create the application FORMS = # These are the defines to control functionality in application during compilation #DEFINES += MAKE_CTLS += MAKE_TOPUP MAKE_SMARTINIT DEFINES += MAKE_EMV MAKE_SPDH DBGTRACE #QT += xml HEADERS = \ Sources/Common/Data/struct.h \ Sources/Common/Txn_flow/transdef.h \ Sources/Isc_OS/DbgTrace.h \ ... SOURCES = \ gprs_connect.cpp \ main.cpp \ Sources/Common/Txn_flow/funct2.cpp \ Sources/Common/Data/appdata.c \ Sources/IscSDK/utllib.c \ ... OTHER_FILES += \ Sources/Isc_OS/equates.inc #include for beeper LIBS += -lQtMultimedia INCLUDEPATH += /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/
I have already replied to SGaist.
Thanks
wrote on 15 May 2018, 05:59 last edited by ambershark@Kashif Can I see the output from the compile? Everything looks in order so maybe the actual error message and output will shed some light on this.
I have already replied to SGaist.
You sure did, sorry missed that, lol.
-
@Kashif Can I see the output from the compile? Everything looks in order so maybe the actual error message and output will shed some light on this.
I have already replied to SGaist.
You sure did, sorry missed that, lol.
wrote on 15 May 2018, 06:03 last edited byHi @ambershark,
Following is the output result:
qbuild arm-unknown-linux-gnueabi-g++ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp arm-unknown-linux-gnueabi-g++ -MMD -MF /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.cpp.d -c -pipe -DQT_KEYPAD_NAVIGATION -mabi=aapcs-linux -I/data/home/builder/build/trunk-builder/.toolchain/arm-unknown-linux-gnueabi/sysroot/usr/include -Wall -W -O2 -O2 -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_POSIX_LOCKS -DQTOPIA_HAVE_SEMTIMEDOP -DQT_NO_QWS_VFB -DQTOPIA_HAVE_V4L2 -DQTOPIA_TELEPHONY -DMEDIA_SERVER -DQTOPIA_MOBILEUI -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_CELL -DQTOPIA_BLUETOOTH -DQT_NO_SXE -DUSE_PICTUREFLOW -DQT_KEYPAD_NAVIGATION -DBUILDER=""\""builder@builder.youtransactor.com\"""" -DMAKE_EMV -DMAKE_SPDH -DDBGTRACE -DQTOPIA_TARGET=""\""QR_EFT_01.07\"""" -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/qtopiacore/qt/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/.uic -I/home/gmx/Documents/gmx-examples/QR_EFT/.moc -I/home/gmx/Documents/gmx-examples/QR_EFT -I/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/devices/youtransactor/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/ -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5 -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtDBus -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSvg -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSql -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtXml -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtNetwork -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtCore -o /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.o /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp In file included from /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:45:0: /home/gmx/Documents/gmx-examples/QR_EFT/Sources/Isc_OS/DbgTrace.h:154:0: warning: "DBGTRACE" redefined [enabled by default] #define DBGTRACE( level, class, format, ...) DBGPRINTF(level,class, format, ##__VA_ARGS__) ^ <command-line>:0:0: note: this is the location of the previous definition /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'int WriteTermFloorDate()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:2812:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In member function 'int GPRSConnect::UserSelection(unsigned char*, short unsigned int)': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3770:20: error: 'QInputDialog' has not been declared QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'UBYTE UpdFieldsPostAppSel()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3079:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ *** Error /default: Prerequisite failed /target: Prerequisite failed /target_post: Prerequisite failed /cpp_compiler_target: Prerequisite failed /gprs_connect.o: Command execution failed $$MKSPEC.CXX -MMD -MF $$[OUTPUT.1] -c $${COMPILER.CXXFLAGS} $${COMPILER.DEFINES} $${COMPILER.INCLUDEPATH} -o $$[OUTPUT.0] $$[INPUT.0] arm-unknown-linux-gnueabi-g++ -MMD -MF /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.cpp.d -c -pipe -DQT_KEYPAD_NAVIGATION -mabi=aapcs-linux -I/data/home/builder/build/trunk-builder/.toolchain/arm-unknown-linux-gnueabi/sysroot/usr/include -Wall -W -O2 -O2 -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_POSIX_LOCKS -DQTOPIA_HAVE_SEMTIMEDOP -DQT_NO_QWS_VFB -DQTOPIA_HAVE_V4L2 -DQTOPIA_TELEPHONY -DMEDIA_SERVER -DQTOPIA_MOBILEUI -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_CELL -DQTOPIA_BLUETOOTH -DQT_NO_SXE -DUSE_PICTUREFLOW -DQT_KEYPAD_NAVIGATION -DBUILDER=""\""builder@builder.youtransactor.com\"""" -DMAKE_EMV -DMAKE_SPDH -DDBGTRACE -DQTOPIA_TARGET=""\""QR_EFT_01.07\"""" -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/qtopiacore/qt/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/.uic -I/home/gmx/Documents/gmx-examples/QR_EFT/.moc -I/home/gmx/Documents/gmx-examples/QR_EFT -I/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/devices/youtransactor/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/ -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5 -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtDBus -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSvg -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSql -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtXml -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtNetwork -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtCore -o /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.o /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp In file included from /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:45:0: /home/gmx/Documents/gmx-examples/QR_EFT/Sources/Isc_OS/DbgTrace.h:154:0: warning: "DBGTRACE" redefined [enabled by default] #define DBGTRACE( level, class, format, ...) DBGPRINTF(level,class, format, ##__VA_ARGS__) ^ <command-line>:0:0: note: this is the location of the previous definition /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'int WriteTermFloorDate()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:2812:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In member function 'int GPRSConnect::UserSelection(unsigned char*, short unsigned int)': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3770:20: error: 'QInputDialog' has not been declared QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'UBYTE UpdFieldsPostAppSel()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3079:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [QR_EFT] Error 1
Thanks
-
Hi @ambershark,
Following is the output result:
qbuild arm-unknown-linux-gnueabi-g++ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp arm-unknown-linux-gnueabi-g++ -MMD -MF /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.cpp.d -c -pipe -DQT_KEYPAD_NAVIGATION -mabi=aapcs-linux -I/data/home/builder/build/trunk-builder/.toolchain/arm-unknown-linux-gnueabi/sysroot/usr/include -Wall -W -O2 -O2 -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_POSIX_LOCKS -DQTOPIA_HAVE_SEMTIMEDOP -DQT_NO_QWS_VFB -DQTOPIA_HAVE_V4L2 -DQTOPIA_TELEPHONY -DMEDIA_SERVER -DQTOPIA_MOBILEUI -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_CELL -DQTOPIA_BLUETOOTH -DQT_NO_SXE -DUSE_PICTUREFLOW -DQT_KEYPAD_NAVIGATION -DBUILDER=""\""builder@builder.youtransactor.com\"""" -DMAKE_EMV -DMAKE_SPDH -DDBGTRACE -DQTOPIA_TARGET=""\""QR_EFT_01.07\"""" -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/qtopiacore/qt/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/.uic -I/home/gmx/Documents/gmx-examples/QR_EFT/.moc -I/home/gmx/Documents/gmx-examples/QR_EFT -I/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/devices/youtransactor/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/ -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5 -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtDBus -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSvg -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSql -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtXml -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtNetwork -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtCore -o /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.o /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp In file included from /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:45:0: /home/gmx/Documents/gmx-examples/QR_EFT/Sources/Isc_OS/DbgTrace.h:154:0: warning: "DBGTRACE" redefined [enabled by default] #define DBGTRACE( level, class, format, ...) DBGPRINTF(level,class, format, ##__VA_ARGS__) ^ <command-line>:0:0: note: this is the location of the previous definition /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'int WriteTermFloorDate()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:2812:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In member function 'int GPRSConnect::UserSelection(unsigned char*, short unsigned int)': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3770:20: error: 'QInputDialog' has not been declared QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'UBYTE UpdFieldsPostAppSel()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3079:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ *** Error /default: Prerequisite failed /target: Prerequisite failed /target_post: Prerequisite failed /cpp_compiler_target: Prerequisite failed /gprs_connect.o: Command execution failed $$MKSPEC.CXX -MMD -MF $$[OUTPUT.1] -c $${COMPILER.CXXFLAGS} $${COMPILER.DEFINES} $${COMPILER.INCLUDEPATH} -o $$[OUTPUT.0] $$[INPUT.0] arm-unknown-linux-gnueabi-g++ -MMD -MF /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.cpp.d -c -pipe -DQT_KEYPAD_NAVIGATION -mabi=aapcs-linux -I/data/home/builder/build/trunk-builder/.toolchain/arm-unknown-linux-gnueabi/sysroot/usr/include -Wall -W -O2 -O2 -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_POSIX_LOCKS -DQTOPIA_HAVE_SEMTIMEDOP -DQT_NO_QWS_VFB -DQTOPIA_HAVE_V4L2 -DQTOPIA_TELEPHONY -DMEDIA_SERVER -DQTOPIA_MOBILEUI -DQTOPIA_NO_PAGE_SIZE_MASK -DQT_QWS_CLIENTBLIT -DQTOPIA_NO_PAGE_SIZE_MASK -DQTOPIA_CELL -DQTOPIA_BLUETOOTH -DQT_NO_SXE -DUSE_PICTUREFLOW -DQT_KEYPAD_NAVIGATION -DBUILDER=""\""builder@builder.youtransactor.com\"""" -DMAKE_EMV -DMAKE_SPDH -DDBGTRACE -DQTOPIA_TARGET=""\""QR_EFT_01.07\"""" -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/qtopiacore/target/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/qtopiacore/qt/mkspecs/qws/linux-yt-g++ -I/home/gmx/Documents/gmx-examples/QR_EFT/.uic -I/home/gmx/Documents/gmx-examples/QR_EFT/.moc -I/home/gmx/Documents/gmx-examples/QR_EFT -I/data/home/builder/build/trunk-builder/.build/qt-extended-4.4.3/devices/youtransactor/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/ -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiacomm/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/openobex/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiabase/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopia/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5 -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/md5/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/include/qtopiagfx/module -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtDBus -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSvg -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtSql -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtXml -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtNetwork -I/opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtCore -o /home/gmx/Documents/gmx-examples/QR_EFT/.obj/gprs_connect.o /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp In file included from /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:45:0: /home/gmx/Documents/gmx-examples/QR_EFT/Sources/Isc_OS/DbgTrace.h:154:0: warning: "DBGTRACE" redefined [enabled by default] #define DBGTRACE( level, class, format, ...) DBGPRINTF(level,class, format, ##__VA_ARGS__) ^ <command-line>:0:0: note: this is the location of the previous definition /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'int WriteTermFloorDate()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:2812:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In member function 'int GPRSConnect::UserSelection(unsigned char*, short unsigned int)': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3770:20: error: 'QInputDialog' has not been declared QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), ^ /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp: In function 'UBYTE UpdFieldsPostAppSel()': /home/gmx/Documents/gmx-examples/QR_EFT/gprs_connect.cpp:3079:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [QR_EFT] Error 1
Thanks
wrote on 15 May 2018, 06:13 last edited by@Kashif Hmm this is really weird ...
Can you check permissions on the QInputDialog files in /opt/ .. those are the ones it should be using to cross compile. Make sure you have read permissions to them.
Next, let's see if maybe the qmake you are using is finding the wrong qmake or something, run
qmake -query
and paste results here.I'm kind of reaching at this point though. Everything looks good so far like it should work.
Another idea is create a simple project that just has a main and a
QInputDialog::getText
or something and see if you can get that to build with your cross compiler toolchain. Take all the complexity from your actual project out of it. -
@Kashif Hmm this is really weird ...
Can you check permissions on the QInputDialog files in /opt/ .. those are the ones it should be using to cross compile. Make sure you have read permissions to them.
Next, let's see if maybe the qmake you are using is finding the wrong qmake or something, run
qmake -query
and paste results here.I'm kind of reaching at this point though. Everything looks good so far like it should work.
Another idea is create a simple project that just has a main and a
QInputDialog::getText
or something and see if you can get that to build with your cross compiler toolchain. Take all the complexity from your actual project out of it.wrote on 15 May 2018, 06:53 last edited byHi @ambershark,
Following are the permissions:
gmx@GMX-SDK:~$ ls -l /usr/include/qt4/QtGui/QInputDialog -rw-r--r-- 1 root root 26 Apr 26 2012 /usr/include/qt4/QtGui/QInputDialog gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog -rw-r--r-- 1 root root 26 Jun 7 2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog -rw-r--r-- 1 root root 26 Jun 7 2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog gmx@GMX-SDK:~$ gmx@GMX-SDK:~$
qmake -query results:
gmx@GMX-SDK:~$ qmake -query QT_INSTALL_PREFIX:/usr QT_INSTALL_DATA:/usr/share/qt4 QT_INSTALL_DOCS:/usr/share/qt4/doc QT_INSTALL_HEADERS:/usr/include/qt4 QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu QT_INSTALL_BINS:/usr/bin QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins QT_INSTALL_IMPORTS:/usr/lib/x86_64-linux-gnu/qt4/imports QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations QT_INSTALL_CONFIGURATION:/etc/xdg QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples QT_INSTALL_DEMOS:/usr/lib/qt4/demos QMAKE_MKSPECS:/usr/share/qt4/mkspecs QMAKE_VERSION:2.01a QT_VERSION:4.8.2 gmx@GMX-SDK:~$
Let me try with simple project as you suggested.
Thanks
-
@Kashif Hmm this is really weird ...
Can you check permissions on the QInputDialog files in /opt/ .. those are the ones it should be using to cross compile. Make sure you have read permissions to them.
Next, let's see if maybe the qmake you are using is finding the wrong qmake or something, run
qmake -query
and paste results here.I'm kind of reaching at this point though. Everything looks good so far like it should work.
Another idea is create a simple project that just has a main and a
QInputDialog::getText
or something and see if you can get that to build with your cross compiler toolchain. Take all the complexity from your actual project out of it.wrote on 15 May 2018, 07:16 last edited byHi @ambershark,
I altered device vendor's sample gui application, comment all widgets and widget-items. Added the code available in qt documentation to test QInoutDialog:getItem.
Still same error.Thanks
-
Hi @ambershark,
Following are the permissions:
gmx@GMX-SDK:~$ ls -l /usr/include/qt4/QtGui/QInputDialog -rw-r--r-- 1 root root 26 Apr 26 2012 /usr/include/qt4/QtGui/QInputDialog gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog -rw-r--r-- 1 root root 26 Jun 7 2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog -rw-r--r-- 1 root root 26 Jun 7 2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog gmx@GMX-SDK:~$ gmx@GMX-SDK:~$
qmake -query results:
gmx@GMX-SDK:~$ qmake -query QT_INSTALL_PREFIX:/usr QT_INSTALL_DATA:/usr/share/qt4 QT_INSTALL_DOCS:/usr/share/qt4/doc QT_INSTALL_HEADERS:/usr/include/qt4 QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu QT_INSTALL_BINS:/usr/bin QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins QT_INSTALL_IMPORTS:/usr/lib/x86_64-linux-gnu/qt4/imports QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations QT_INSTALL_CONFIGURATION:/etc/xdg QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples QT_INSTALL_DEMOS:/usr/lib/qt4/demos QMAKE_MKSPECS:/usr/share/qt4/mkspecs QMAKE_VERSION:2.01a QT_VERSION:4.8.2 gmx@GMX-SDK:~$
Let me try with simple project as you suggested.
Thanks
wrote on 15 May 2018, 13:25 last edited byHi @Kashif,
I got the following reply from my device vendor:
I checked on our SDK and QInputDialog is disabled from the toolchain by default in the QtExtended from qtopia, you can look at http://doc.qt.io/archives/qt-4.8 and look for an alternative. the list of disabled elements by qtopia can be found at /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/qconfig-qpe.h in your toolchain
Can you please suggest an approach to achieve my target:
0> User have Purchase Ticket / Refund Ticket options 1> User selects purchase ticket 2> Application lists types of tickets a> User Selects ticket or cancel (until completion/user selection step 3 should not execute) 3> Do purchase process or exit purchase process
Thanks
-
-
Hi @Kashif,
I got the following reply from my device vendor:
I checked on our SDK and QInputDialog is disabled from the toolchain by default in the QtExtended from qtopia, you can look at http://doc.qt.io/archives/qt-4.8 and look for an alternative. the list of disabled elements by qtopia can be found at /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/qconfig-qpe.h in your toolchain
Can you please suggest an approach to achieve my target:
0> User have Purchase Ticket / Refund Ticket options 1> User selects purchase ticket 2> Application lists types of tickets a> User Selects ticket or cancel (until completion/user selection step 3 should not execute) 3> Do purchase process or exit purchase process
Thanks
wrote on 16 May 2018, 04:41 last edited by@Kashif said in 'QInputDialog' has not been declared - embadded development:
is disabled from the toolchain by default in the QtExtended from qtopia
Well that makes a lot more sense. :)
Like @SGaist said, just write your own QDialog. Make it modal by calling it with
myDialog->exec()
and test that return code for aQDialog::Accepted
in order to proceed orQDialog::Rejected
in order to exit the process. -
@Kashif said in 'QInputDialog' has not been declared - embadded development:
is disabled from the toolchain by default in the QtExtended from qtopia
Well that makes a lot more sense. :)
Like @SGaist said, just write your own QDialog. Make it modal by calling it with
myDialog->exec()
and test that return code for aQDialog::Accepted
in order to proceed orQDialog::Rejected
in order to exit the process.wrote on 16 May 2018, 05:28 last edited byHi @SGaist and @ambershark,
I am planned to create custom dialog using QDialog class, in parallel I have placed a question to device vendor if I can use QDialog? or if I can use QTCore application. I hope I'll get positive reply for at least one of them.
Thanks for your time and response.
-
Hi @SGaist and @ambershark,
I am planned to create custom dialog using QDialog class, in parallel I have placed a question to device vendor if I can use QDialog? or if I can use QTCore application. I hope I'll get positive reply for at least one of them.
Thanks for your time and response.
wrote on 16 May 2018, 06:42 last edited by@Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.
And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)
-
@Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.
And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)
wrote on 16 May 2018, 08:44 last edited by KashifHi @ambershark,
PreviouslyI have created secondary widget and called it but my parent widget code was also running this was the reason I moved towards QDialog.
The good new is I have created a custom sample dialog class and it is working as required. Now I have to make it similar to QInputDialog. Following is the code from my custom dialog class:#ifndef APPSELECTIONDIALOG_H #define APPSELECTIONDIALOG_H #include <QtGui/QDialog> #include <QtGui/QVBoxLayout> #include <QtGui/QLineEdit> #include <QtGui/QPushButton> //#include <QtGui/QLabel> class appSelectionDialog: public QDialog { Q_OBJECT public: explicit appSelectionDialog(QWidget *p = 0): QDialog(p) { QVBoxLayout *layout = new QVBoxLayout(this); lineEdit = new QLineEdit(this); QPushButton *button = new QPushButton("Ok", this); layout->addWidget(lineEdit); layout->addWidget(button); setLayout(layout); connect(button, SIGNAL(clicked()), SLOT(accept())); } QString getText() const { return lineEdit->text(); } private: QLineEdit *lineEdit; }; #endif // APPSELECTIONDIALOG_H
Calling function:
appSelectionDialog dialog; // dialog object exists (void) dialog.exec(); // dialog is visible DBGPRINTF(LOG_INFO, CLASS_EMV,"Text [%s]", dialog.getText().toLocal8Bit().constData() ); //This method prints the text on console in c format
If you have reference to make it similar to QInputDialog please share it :)
Thanks
-
@Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.
And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)
wrote on 16 May 2018, 11:50 last edited byHi @ambershark,
Can you please help me how do I modify the constructor to get the parameters similar to QInputDialog::getItem
Thanks
-
@Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.
And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)
wrote on 16 May 2018, 14:32 last edited byHi @ambershark,
I have created the constructor successfully and it display the item in comboBox.
Thanks for your help.
1/21