1 Attachment(s)
PROBLEM INCLUDING 'QSystemInfo' HEADER FILE
I am working on my first Qt project using the beta version of Qt 4.6 (I had a problem installing the final version). I am writing an application intended only for Symbian mobile devices and I want it to detect whether the device has a touch screen or not. I pasted the following code snippet from the documentation (the page entitled 'Quickstart Example' ).
Code:
#ifdef Q_OS_SYMBIAN
#include <qsysteminfo.h>
#else
#include <QSystemInfo> //(1)
#endif
using namespace QtMobility; //(2)
However, I get a compiler error 'cannot open include file: 'QSystemInfo': (see attachment). I have done the same thing before without any problem. How should I proceed? Several related questions are as follows:- An attempt to load the final version of Qt 4.6 failed. (I can provide a snap-shot of the screen message later if appropriate). Should I uninstall the beta version before installing the final version? If I have developed a project on the beta version, can I build it on the final version?
Re: PROBLEM INCLUDING 'QSystemInfo' HEADER FILE
Do you have
Quote:
CONFIG += mobility
MOBILITY += systeminfo
in your project file and do you properly link to the Qt mobility library? (...and don't forget to rerun qmake and build the project again!)
AND captions in lowercase are fine, there is no need to capitalize them.