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.
First Post
I will use this blog like a log and a knowledge base. When I when writing this Post I was studying this thecnologies:
- MDA
- GMF
- EMF
- OCL
- UML
- QTopia
The last one I am using at my employ, the others to my graduation project. I hope this blog be useful to somebody.
Hello world!
Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!
-
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