-1
是新來的Qt和我有點失落......GPS使用Qt移動
我只想包括以下內容:
#include <QGeoPositionInfo>
這是我的.pro文件:
# Add files and directories to ship with the application
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1
symbian:TARGET.UID3 = 0xEF75C11C
# Smart Installer package's UID
# This UID is from the protected range
# and therefore the package will fail to install if self-signed
# By default qmake uses the unprotected range value if unprotected UID is defined for the application
# and 0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
# Allow network access on Symbian
symbian:TARGET.CAPABILITY += NetworkServices
# If your application uses the Qt Mobility libraries, uncomment
# the following lines and add the respective components to the
# MOBILITY variable.
QT += network
CONFIG += mobility
MOBILITY +=systeminfo
SOURCES += main.cpp mainwindow.cpp \
form.cpp \
form1.cpp
HEADERS += mainwindow.h \
form.h \
form1.h
FORMS += mainwindow.ui \
form.ui \
form1.ui
# Please do not modify the following two lines. Required for deployment.
include(deployment.pri)
qtcAddDeployment()
OTHER_FILES +=
RESOURCES += \
karim.qrc
,我得到了以下錯誤
C:\Users\user\Desktop\karim\Qt\Project-build-simulator\..\Project\form1.h:3: error: QGeoPositionInfo: No such file or directory
有點丟失,我的問題如下:
Qt Mobility是否默認使用Qt SDK?
如果是,它應該是代碼中的問題嗎?你能告訴我我做錯了什麼?
'MOBILITY + = location systeminfo'。您可能還需要將'QTM_USE_NAMESPACE'添加到源文件或頭文件的開頭。 – Abhijith