Thread
:
QtCreator + MADDE + Linux
View Single Post
choubbi
2010-03-23 , 13:10
Posts: 139 | Thanked: 32 times | Joined on May 2008 @ France
#
19
Linux Qt development :
0/ learn how to use MADDE without Qt, just simple CLI programs.
1/ Install Qt Creator on your linux machine (package qtcreator on ubuntu), and run it
2/ in terminal, run the command :
Code:
mad pscreate -t qt_simple program
You just have created a copy of the Qt example provided with MADDE.
"program" is now the name of your project. The folder "program" has been created and you can find the required files in it.
3/ in the folder "program", double click the file "qtprog.pro". Qt Creator should open.
4/ On the vertical menu on the left, click "edit". Left click on "qtprog" > Add New... > Qt Designer Form Class (bottom of the list), click Ok > in the list, select "Main Window", click Next > click Next > click Finish.
5/ Open program/src/qtmain.cpp, and :
remove the lines :
-QPushButton hello("Hello world!");
-hello.show();
add the lines :
+#include "mainwindow.h"
before "int main ..."
+MainWindow w;
+w.show();
before "return ..."
6/ in Qt Creator, double click on "mainwindow.ui", and in the up-right corner, remove all the items listed under "central widget" (normally, "menubar" and "statusbar", if there is also "maintoolbar", remove it too). Click on "MainWindow".
Now, in the down-right corner, look for "geometry", change the values to "Width" : 800 and "Height" : 400 (
yes, 400, not 480
). Look for "windowTitle", and change the text to what you want to see in the top bar on your N900.
7/ optional : if you want to have a personalised icon, and stuff, follow this guide :
http://wiki.maemo.org/MADDE/Packaging
8/ now you can learn how to use Qt Creator with platform-independant tutorials/guides (Qt Creator integrated tutorials and help/documentation was good enough for me).
9/ compilation and packaging is the same as CLI apps. In the "program" folder, run "madde qmake", "madde make", and the following. I didn't use Qt Creator buttons for build and run, I don't know if you can.
I hope this helps some people to get started.
I tried several times to start programming for my N900, but always lost hope. I finally made my first (simple) app 2 or 3 weeks ago, in one day.
cool links that helped me :
Qt:
http://wiki.maemo.org/MADDE/Qt_extended_example
http://wiki.maemo.org/MADDE/Qt_extended_example/Part1
MADDE:
http://wiki.maemo.org/MADDE/Device_runtime
I can give the sources of my application if anyone wants. It's just an app that has 2 combo boxes, and looks up in a table and displays the corresponding value.
Last edited by choubbi; 2010-03-23 at
13:14
.
Quote & Reply
|
The Following 3 Users Say Thank You to choubbi For This Useful Post:
Intergalactic Christ
,
nath
,
rmerren
choubbi
View Public Profile
Send a private message to choubbi
Find all posts by choubbi