RE: Anygui on Zaurus
"Clark, Chris" <[email protected]> Mon, 11 Aug 2003 14:26:59 -0400
| Newsgroups | gmane.comp.python.anygui.devel |
|---|---|
| Message-ID | <[email protected]> |
Glad to see a fellow Zaurus user :-) I've a few comments below. Chris > -----Original Message----- > From: Stephen Wilbourne [mailto:[email protected]] > Sent: Monday, August 11, 2003 12:10 AM > To: [email protected] > Subject: [Anygui-devel] Anygui on Zaurus .. Snip > 1. To make the application run as a window that puts an icon > on the taskbar, and that you can return to by selecting the icon: > > - at the top of the program, add: > from qtpe import QPEApplication > That's a good idea, I didn't think of embedded support and I started to use anygui for pretty much the same reason as you :-) I'm also new to python, so my suggestion below may not be the "best" python approach. The above change will break QT backends where QT embedded is NOT installed (e.g. Windows boxes and most Linux QT installations). Consider TRYing to import the embedded stuff thusly: # ----- code ----- try: from qtpe import * USE_QPE = 1 except: USE_QPE = 0 # ----- code ----- > - throughout the program, change all references to > 'QApplication' to 'QPEApplication' > Then instead of blanket changing the QApplication references consider: # ----- code ----- if USE_QPE == 1 : a = QPEApplication(sys.argv) else: a = QApplication(sys.argv) # ----- code ----- I would guess this would give you more chance of getting your changes submitted into the AnyGUI codeline. I use this approach in a QT application I've written (also using Py-sqlite) where anygui wasn't suitable (I really wanted a table field and whilst I was able to "emulate" it using a text view, it didn't work that well). > .. Snip stuff to do with changing behaviour of AnyGUI under QT backend. I'd be careful with these types of changes as if you have a different backend you run the chance of having different behaviours (e.g. what happens if you use the win32 backend or the TK one?) when you move your application. Chris ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01