-1

我是 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 提供?

如果是,它应该是代码中的问题吗?你能告诉我我做错了什么吗?

请具体回答,我将不胜感激...

4

1 回答 1

0

您是否构建并安装了 Mobility API 包? http://doc.qt.nokia.com/qtmobility/installation.html

而且您还需要 .pro 文件上的 MOBILITY += 位置。

于 2012-05-28T08:02:30.810 回答