Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
This page shows a Hello Qt program using the Qt Creator
IDE under the Ubuntu operating system
for the Symbian platform.
Technical facts
Application type(s)
Operating system(s) or programming environment(s)
IDE(s):
Project type:
C++ standard:
Compiler(s):
Libraries used:
Qt: version 4.7.0 (32 bit)
Qt project file: CppHelloQtQtCreatorUbuntuSymbian.pro
#-------------------------------------------------
#
# Project created by QtCreator 2011-01-26T12:04:28
#
#-------------------------------------------------
QT += core gui
TARGET = CppHelloQtQtCreatorUbuntuSymbian
TEMPLATE = app
SOURCES += main.cpp\
dialog.cpp
HEADERS += dialog.h
FORMS += dialog.ui
CONFIG += mobility
MOBILITY =
symbian {
TARGET.UID3 = 0xe416ef42
# TARGET.CAPABILITY +=
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}
|
dialog.cpp
//---------------------------------------------------------------------------
/*
CppHelloQtQtCreatorUbuntuSymbian, Hello World program
using Qt Creator under Ubuntu for Symbian
Copyright (C) 2011 Richel Bilderbeek
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/CppHelloQtQtCreatorUbuntuSymbian.htm
//---------------------------------------------------------------------------
#include "dialog.h"
#include "ui_dialog.h"
//---------------------------------------------------------------------------
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
}
//---------------------------------------------------------------------------
Dialog::~Dialog()
{
delete ui;
}
//---------------------------------------------------------------------------
void Dialog::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
//---------------------------------------------------------------------------
void Dialog::on_pushButton_clicked()
{
ui->pushButton->setText("Hello Qt");
}
//---------------------------------------------------------------------------
|
dialog.h
//---------------------------------------------------------------------------
/*
CppHelloQtQtCreatorUbuntuSymbian, Hello World program
using Qt Creator under Ubuntu for Symbian
Copyright (C) 2011 Richel Bilderbeek
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/CppHelloQtQtCreatorUbuntuSymbian.htm
//---------------------------------------------------------------------------
#ifndef DIALOG_H
#define DIALOG_H
//---------------------------------------------------------------------------
#include <QDialog>
//---------------------------------------------------------------------------
namespace Ui {
class Dialog;
}
//---------------------------------------------------------------------------
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = 0);
~Dialog();
protected:
void changeEvent(QEvent *e);
private:
Ui::Dialog *ui;
private slots:
void on_pushButton_clicked();
};
//---------------------------------------------------------------------------
#endif // DIALOG_H
//---------------------------------------------------------------------------
|
main.cpp
//---------------------------------------------------------------------------
/*
CppHelloQtQtCreatorUbuntuSymbian, Hello World program
using Qt Creator under Ubuntu for Symbian
Copyright (C) 2011 Richel Bilderbeek
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/CppHelloQtQtCreatorUbuntuSymbian.htm
//---------------------------------------------------------------------------
#include <QtGui/QApplication>
#include "dialog.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Dialog w;
#if defined(Q_WS_S60)
w.showMaximized();
#else
w.show();
#endif
return a.exec();
}
|
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
