Hello All,
I am a first time user and getting the following errors...
first its saying for the QSystemDeviceInfo *deviceInfo; --- >
syntax error:missing ';' before *
i have pasted all my project file, header and source file...I have followed their instruction exactly but things not working.....help needed..can anyone help????
=============================================================
#ifndef BATTERYIND_H
#define BATTERYIND_H
#include <QSystemInfo>
#include <QDialog>
namespace Ui {
class batteryind;
}
class batteryind : public QDialog
{
Q_OBJECT
public:
explicit batteryind(QWidget *parent = 0);
~batteryind();
private:
Ui::batteryind *ui;
void setupGeneral();
QSystemDeviceInfo *deviceInfo;
};
#endif // BATTERYIND_H
===========================================================
#include "batteryind.h"
#include "ui_batteryind.h"
batteryind::batteryind(QWidget *parent) :
QDialog(parent),
ui(new Ui::batteryind),
deviceInfo(NULL)
{
ui->setupUi(this);
setupGeneral();
}
batteryind::~batteryind()
{
delete ui;
}
void batteryind::setupGeneral()
{
deviceInfo = new QSystemDeviceInfo(this);
ui->batteryLevelBar->setValue(deviceInfo->batteryLevel());
connect(deviceInfo, SIGNAL(batteryLevelChanged(int)),
ui->batteryLevelBar, SLOT(setValue(int)));
}
====================================================
#include <QtGui/QApplication>
#include "batteryind.h"
QTM_USE_NAMESPACE
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
batteryind w;
w.showMaximized();
return a.exec();
}
========================================
#-------------------------------------------------
#
# Project created by QtCreator 2010-08-28T23:19:45
#
#-------------------------------------------------
QT += core gui
TARGET = batteryind
TEMPLATE = app
SOURCES += main.cpp\
batteryind.cpp
HEADERS += batteryind.h
FORMS += batteryind.ui
CONFIG += mobility
MOBILITY += systeminfo
symbian {
TARGET.UID3 = 0xe17573bd
# TARGET.CAPABILITY +=
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}





