USB and appTrk works well with other projects. I installed Qt Mobility with the SIS of the SDK. I reinstalled it with the Symbian menu.
Here are my codes:
main.cpp:
Code:
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
#if defined(Q_WS_S60)
w.showMaximized();
#else
w.show();
#endif
return a.exec();
}
mainwindow.h:
Code:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
mainwindow.cpp:
Code:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QContactManager>
#include <QSystemInfo>
#include <QContact>
#include <QList>
QTM_USE_NAMESPACE
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QContactManager cm;
QList<QContact> allContacts = cm.contacts();
QString strContactNumber;
strContactNumber.setNum(allContacts.length());
ui->iLabelContactNumber->setText(strContactNumber);
QSystemInfo s;
ui->iLabelCountryCode->setText(s.currentCountryCode());
}
MainWindow::~MainWindow()
{
delete ui;
}