PDA

View Full Version : QWidget or MainWindow display problem at Desktop environment



oguzy
17th November 2008, 10:43
Hi,

Here (http://rafb.net/p/LDKkJZ10.html) is simple pyqt4 code that just
enables and disables the wireless status with the same time displaying a
transparent pic. I assigned this application to a key combination at my
Desktop environment. The problem is when i press the keys i don't see
the GUI in the front of the Desktop. I created a simple MainWindow
application and assigned it to the key combination this time. When i
pressed the keys it shows the window. I am not sure why the widget is
not beinng showed although i can see the GUI when i ran from terminal
via python mysapplication.py

I am using Gnome. I will be happy if someone help me to find how can i fix it so that i
will see the pixmap when i press the keys.

wysota
18th November 2008, 09:35
I think the problem is that you are using relative path to the image. Try starting the application using console with an absolute path when your current directory is different than where your app resides and see if the problem reveals itself there as well. I mean something like:

cd /tmp
/home/.../.../myapp/myapp

If I'm right, you shouldn't see the widget as well.

oguzy
19th November 2008, 10:01
The problem was related with the paths. After using the absolute paths the problem is solved.
Thanx.