开发者

Error Including QGeoPositionInfo

开发者 https://www.devze.com 2023-03-25 08:38 出处:网络
I am new to Qt , I have been given this task where i should use GPS so to use to GPS ,i only did this one line of code

I am new to Qt ,

I have been given this task where i should use GPS

so to use to GPS ,i only did this one line of code

 #include <QGeoPositionInfo>

and the following error appeared

In file included from ..\Project\mainwindow.cpp:3:
..\Project\/form.h:7:28: error: QGeoPositionInfo: No such file or directory

how can i solve this issue ? how can i get this file ?

please note that i have tried re installing Qt Creator...

Please be specific i would really appreciate that...开发者_StackOverflow社区


QGeoPositionInfo is part of Qt Mobility, which is an extension to Qt.


in .pro file add:

{CONFIG += mobility
MOBILITY +=location}

2:in header add:

{using namespace QTMobility}
0

精彩评论

暂无评论...
验证码 换一张
取 消