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: self.editArea.setText(self.diary.currentPage().text)
I could use something like the \"with\" operator in Pascal whereby I would write:
with self do
editArea.setText(diary.currentPage().text)
...
As always, any help is appreciated.
z.