I am creating an Mobile Qt Application. I experience the next problem.
I can include <QSystemInfo> , this is recognized (because of the intelisense of Qt Creator 2.0).
When I want to make an instance of this class. I get error " 'QSystemInfo' not declard in this scope'". [on the red line code]
#include <QSystemInfo>
...
void MainWindow::readLocationInfo()
{
[COLOR="Red"] QSystemInfo test();
mCountry = test.currentCountryCode();[/COLOR]
QString strOutput = "";
strOutput +=
"Country : " + infoSession.getCountry() + "\n" +
"Language code : " + infoSession.getLanguageCode();
QMessageBox::information(this, "Location Info", strOutput, tr("&OK"));
}
Also I edited my project file for this api
CONFIG += mobility MOBILITY += systeminfo location
All other Qt classes are recognized (QString, ... )
Someone notices the my error ?
These version did not work out either
QSystemInfo test; QSystemInfo *test = new QSystemInfo;
Edited by PunkDudez, 17 November 2010 - 02:30 PM.
Solved


Sign In
Create Account


Back to top









