My First App
I will post this, to have a complete tutorial doing a first useful app. I’m going to use SDK 4.2.4 to compile and use, but this app won’t use any version specific function.
I am going to develop this application at KDevelop 3.3.4, First create a new project. Click at Project->NewProject.
After choosen the Project Model in the wizard, we have a example application created with some basic functions implemented.
The Qtopia use a pre-compiler to do our lives easy, then to compile first use Scripts->RunQtopiamake X86. This script will generate a make file. Now compile the Project using the usual way to build a project in KDevelop.
If everything goes Ok now you can install the executable file.
Execute “make install”.
Later of installed you can test the application starting runqpe on Desktop.
The QTopia transparency Quest
In the last weeks I was struggling to get a transparency effect to a TopWindow. I could get it by a easy way, but it would let all yours children transparent too, and it wasn’t desired.
The easy way would be:
this->setWindowOpacity(0.5);
I have tried other approache with StyleSheets too, but I didn’t get my goal.
Searching the internet I found a lot of possible solutions but any of them works to me.
The solution found was simple, I added this three lines at widget constructor only.
QPalette p = this->palette();
p->setBrush(Qt::Window,Qt::Transparent);
this->setPalette(p);
This was enough to get all that I was trying to do, but the result archieved hadn’t good legibility, therefore when you have a open application maximed you can’t read texts. So I will have to do the desktop background image as the background of the widget. I guess that in this way I’ll get a good result.
See ya!
First steps on Qtopia SDK
I have started to use the Qtopia framework 1 month ago. I have a good impression until now. It is a stable framework, with a good documentation. The Trolltech’s guys are working hard.
But I have some troubles too, and I will use this blog to describe the problems that I am facing on my daily work. So hands on.
Compiling the first program
The documentation that I found at Internet really works, but I wasn’t trying to do a simple “Hello world!” Program, I wanted to do a “Hello wold!” with a pushbutton.
I The first trouble that I faced was related with libraries. I didn’t get to use the push button. Well I include the files with the usual code:
#include "qpushbutton.h"
But I get a problem in the linkage phase as expected. Well the problem was at “.pro” file, I have to use this file to inform to the project the libraries directories.
-
Arquivos
- Dezembro 2008 (2)
- Novembro 2008 (5)
- Agosto 2008 (1)
- Abril 2008 (2)
- Novembro 2007 (2)
- Setembro 2007 (1)
- Agosto 2007 (4)
-
Categorias
-
RSS
Entradas RSS
Comentários RSS
