Reply
Thread Tools
Nyrath's Avatar
Posts: 92 | Thanked: 50 times | Joined on Jan 2006 @ the praeternatural tower
#1
TrollTech's Qt application framework is by far the easiest and most powerful GUI framework available. It has loads of extra goodies, like GUID classes and data persistence objects. I use it at my day job for our major projects.

TrollTech was recently purchased by Nokia.

The free open-source version of Qt was ported to Maemo
http://qt4.garage.maemo.org/. It is a set of libraries for C++

However, that wasn't what I was waiting for. There are a set of Python bindings for Qt, called PyQt. This gives one all the power of Qt within the ease of programming in Python. PyQt is quite popular.

Yesterday, spartanNTX brought the good news. PyQt has been ported to Maemo for the Diablo OS.
http://pyqt.garage.maemo.org/
 

The Following 7 Users Say Thank You to Nyrath For This Useful Post:
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#2
Yup, that's good news all right !

It would be interesting to see a comparison of launch times + memory usage *on the tablets* for a test app done both in PyGTK and PyQt in the closest possible way...
 
Posts: 223 | Thanked: 67 times | Joined on Jun 2006
#3
Here is an app I found that you can use to test your installation.
Attached Files
File Type: gz Qdir.tar.gz (1,023 Bytes, 213 views)
 

The Following 2 Users Say Thank You to gowen For This Useful Post:
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#4
The maemo Qt/pyQt port looks really well done. I downloaded an old favourite of mine, Treeline, which is a fairly complex app.

It ran without problems, and automatically hildonized (menu, full-screen etc.).

Start-up time doesn't look very different from pyGtk though.
 
Posts: 1,097 | Thanked: 650 times | Joined on Nov 2007
#5
Originally Posted by fpp View Post
The maemo Qt/pyQt port looks really well done. I downloaded an old favourite of mine, Treeline, which is a fairly complex app.

It ran without problems, and automatically hildonized (menu, full-screen etc.).

Start-up time doesn't look very different from pyGtk though.
This is the a very encourageing news of late (apart from the freemantle based speculations thread). I should start getting the old QT apps on the N810 - this really opens up a lot of apps that can be used on the Nokia IT's.

Have been waiting for PyQT for al long time.
 
Nyrath's Avatar
Posts: 92 | Thanked: 50 times | Joined on Jan 2006 @ the praeternatural tower
#6
Originally Posted by gowen View Post
Here is an app I found that you can use to test your installation.
Sonofagun. It actually worked!

I copied it over to the NIT's internal storage with a USB cable, used emelFM2 to copy it to /home/user, then used XTerm to do a chmod +x Qdir.py, then a ./Qdir.py

It gave me some GTK warning, but the program actually ran. Nice GUI display of the directory.

It did take some time to start up, though. Par for the course I guess.
 
Nyrath's Avatar
Posts: 92 | Thanked: 50 times | Joined on Jan 2006 @ the praeternatural tower
#7
I'm really impressed now! I took my app, converted all the CR/LF in the *.py files into LF, copied them with the data and image files over to the Nokia, did a cmod +x *.py, and ran the main file with python. Blasted thing worked perfectly. I'll have screen shots later.

The layout of the screen is a little smashed since it was set up for a monitor larger than 800x480, but that will be trivial to fix.

This is great!
 
Posts: 334 | Thanked: 55 times | Joined on Aug 2007 @ Eastern Ontario, Canada
#8
Let me get this straight:

Can I develop and test a Python Qt app on Windows, Linux or Mac using the QT UI Designer and then re-target/run it on an IT without having to use Scratchbox?

And it just works and is auto-Hildonized as long as I am careful about window sizes?

Don.
 
Nyrath's Avatar
Posts: 92 | Thanked: 50 times | Joined on Jan 2006 @ the praeternatural tower
#9
Yes. That's exactly what I'm saying.

I developed my app on Windows, using Python with PyQt. I used EasyEclipse for Python to write and test it, but I could have just as easily used Notepad and the Windows Command Prompt. My app included various image in PNG format. It ran wonderfully on Windows.

On my Nokia 810 with Diablo (you must have Diablo, PyQt for Maemo won't work on anything earlier), I installed Python for Maemo, Qt for Maemo, and the three PyQt modules I used in my app (QtCore, QtGui, and QtXml).

I used a Windows utility called CRLF.exe to convert all the *.py files so they had LF at the line ends, instead of CR/LF. Other than this, I did not change any of the *.py files one bit.

Then I copied over all my *.py files and image files, maintaining the folder structure. I didn't know the standard Linux conventions, so I put them all in a new folder in /home/user/. I copied them by connecting my Nokia 810 to my Windows machine using a USB cable, copying to the external memory card. I then used emelFM2 on the Nokia to copy the files from the external memory card to /home/user/.

I then ran XTerm. I used the cd command to enter the folder with my *.py files. I then used the command chmod +x *.py to set the execution permission on all the python files.

Finally, in XTerm, I entered the command python MyMain.py where MyMain.py is the python file with your "main()" function. If I had been smart enough to put a "she-bang" line at the start of the file, I could have run it with ./MyMain.py

After about 20 seconds, my app started up. Just like magic. All without requiring the Scratchbox.

Last edited by Nyrath; 2008-10-02 at 11:08.
 

The Following 4 Users Say Thank You to Nyrath For This Useful Post:
Nyrath's Avatar
Posts: 92 | Thanked: 50 times | Joined on Jan 2006 @ the praeternatural tower
#10
Here are some images.
http://www.flickr.com/photos/nyrath/...7606410052769/

In each pair, the first one is on Windows, the second is on the Nokia 810. Use the control on the right to move to the next image in the set.


I'm going to have to re-arrange the controls, they are a bit squashed on the Nokia.
 

The Following 2 Users Say Thank You to Nyrath For This Useful Post:
Reply

Tags
pyqt, python


 
Forum Jump


All times are GMT. The time now is 03:43.