Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Qt QtMobility::QSystemInfo

 

QtMobility::QSystemInfo is a QtMobility class for mobile applications to obtain system information about the mobile phone.

 

 

 

 

 

 

Technical facts

 

Application type(s)

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: CppQSystemInfo.pro

 

#-------------------------------------------------
#
# Project created by QtCreator 2011-02-15T13:25:58
#
#-------------------------------------------------
QT       += core gui
TARGET = CppQSystemInfo
TEMPLATE = app
SOURCES += main.cpp
CONFIG += mobility
MOBILITY =
symbian {
    TARGET.UID3 = 0xed4d0261
    # TARGET.CAPABILITY +=
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}
MOBILITY += systeminfo

 

 

 

 

 

main.cpp

 

#include <QApplication>
#include <QLabel>
#include <QSystemInfo>
#include <boost/scoped_ptr.hpp>

//Adapted from http://www.forum.nokia.com/Develop/Qt/Documentation/
//'Qt for Mobile Application Development for Education v1.1'
int main(int argc, char *argv[] )
{
  QApplication app( argc, argv );
  QtMobility::QSystemInfo s;
  boost::scoped_ptr<QLabel> label(
    new QLabel("Current language is " + s.currentLanguage()
      + " and you're using Qt "
      + s.version(QtMobility::QSystemInfo::QtCore) ) );
  label->show();
  return app.exec();
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict