|
2010-07-22
, 09:17
|
Posts: 219 |
Thanked: 94 times |
Joined on Nov 2009
@ Helsinki, Finland
|
#2
|
The Following User Says Thank You to naabi For This Useful Post: | ||
|
2010-07-22
, 10:00
|
Posts: 24 |
Thanked: 9 times |
Joined on Jul 2010
@ Vicenza (Italy)
|
#3
|
#include "finestra02.h" #include "ui_finestra02.h"
void Finestra01::on_pushButton_clicked() { Finestra02 f2; f2.show(); }
void Finestra01::on_pushButton_clicked() { Finestra02 f2; f2.setAttribute(Qt::WA_Maemo5StackedWindow); // THIS LINE RETURNS A COMPILER ERROR (WA_Maemo5StackedWindow is not a member of Qt) f2.show(); }
|
2010-07-22
, 10:06
|
Posts: 388 |
Thanked: 842 times |
Joined on Sep 2009
@ Finland
|
#4
|
#ifdef Q_WS_MAEMO_5 #include <QtMaemo5> #endif
maemo5 { QT += maemo5 }
#ifdef Q_WS_MAEMO_5 window.setAttribute(Qt::WA_Maemo5StackedWindow); window.setWindowFlags(Qt::Window); #endif
The Following 4 Users Say Thank You to hqh For This Useful Post: | ||
|
2010-07-22
, 10:20
|
Posts: 24 |
Thanked: 9 times |
Joined on Jul 2010
@ Vicenza (Italy)
|
#5
|
Finestra01::Finestra01(QWidget *parent) : QMainWindow(parent), ui(new Ui::Finestra01) { ui->setupUi(this); #ifdef Q_WS_MAEMO_5 window->setAttribute(Qt::WA_Maemo5StackedWindow); window->setWindowFlags(Qt::Window); #endif }
|
2010-07-22
, 10:30
|
Posts: 388 |
Thanked: 842 times |
Joined on Sep 2009
@ Finland
|
#6
|
Do you think it's right?
However nothing happens in the simulator (only a glitch...), you mean that if I run the application on my N900 I should see something working better?
The Following User Says Thank You to hqh For This Useful Post: | ||
|
2010-07-22
, 12:19
|
Posts: 24 |
Thanked: 9 times |
Joined on Jul 2010
@ Vicenza (Italy)
|
#7
|
The constructor is a good place to set those, but you'll have to change it to "this->" instead of "window->".
Yes, you'll have to run it on the N900 to see it working.
|
2010-07-22
, 14:34
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#8
|
|
2010-07-22
, 15:28
|
Posts: 219 |
Thanked: 94 times |
Joined on Nov 2009
@ Helsinki, Finland
|
#9
|
However, I ask myself why all this small pieces of code are not included by default in the templates by QT Creator when I create a Maemo 5 application...
I'm trying to build my first complete multi-windows qt n900 application (I've already built a simple application and I was able to run it on my n900).
I've installed latest version of nokia qt creator (LGPL install) downloaded from here on ubuntu lucid-64.
Now I'm stuck with stacked windows: I really don't understand how to do it.
I tried to code the example presented in qt creator help but I was not able to run it (WA_Maemo5StakedWindows is not a member of qt) and any other test was a failure.
I have the start window with many pushbutton and I'd like each button to open a different child (stacked) window.
1) First of all, I don't know how to draw different windows (different .ui files) inside the same project
2) Second I don't know how to stack one window on another
I really don't understand how to do it INSIDE QT Creator (I mean without coding everything from scratch).
Should I try a different SDK?
Can please someone help me?
Any general indication as far as complete code example are really appreciated.
Thanks in advance
Michele
Last edited by mmichielin; 2010-07-22 at 09:09.