OESF | ELSI (coming soon) | Community Links (coming soon) | LinuxPDA | Ibiblio


Welcome Guest ( Log In | Register )

> Python+Qtopia: styles, events, quickexec etc.
post May 20 2004, 02:07 AM
Post #1

Group: Members
Posts: 366
Joined: 4-November 03
From: Slovakia
Member No.: 850

Hi all,

I've been working on a little diary application for the Z using Python and Qt. It's my first Python project and so far it's been nothing but instant gratification. I'm very happy.

There are, however, a few things I could use some help with:

1. How can I apply Qtopia's current widget style and window decorations to my app? I would like to have my program visually integrated but when I try app.setStyle() nothing works except QWindowsStyle. How can I find out which QStyles are available? Or is there some other mechanism for doing this than app.setStyle()? And how do I find out which style is being used in Qtopia?

2. To persist the state of my app, I override hideEvent() in my main widget. I think there must be a better way but I couldn't find any closeEvent() handler to override. (By the way, if someone could explain to me how class members are sorted in Qt documentation I would be quite grateful. Alphabet it isn't, that's for sure.)

3. I can't close my app with the Cancel key (on the 5500), I have to pull out the stylus and tap the title bar button. Any advice on how to get the Cancel key working?

4. I realize the slow start-up is largely due to the Python runtime being launched but I was wondering whether it would be possible to write a quicklauncher/quickexec app in Python and what it would take. Or maybe whether it would be possible to have the Python runtime pre-loaded, including PyQt. A Python quickexec!

5. Finally, a pure Python question. Since I am a complete newbie, my code (all 139 lines of it) may not be quite up to scratch. In particular, I get irritated by having to reference 'self' all the time in instance methods. I get lines like:

I could use something like the "with" operator in Pascal whereby I would write:
with self do



As always, any help is appreciated.

Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 25th March 2017 - 01:50 AM