Reply
Thread Tools
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#61
Superb tutorial, fatalsaint
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#62
Guys

lots of activity while I was alseep

i'll update the orignial post based on all the comments so far, and look to pushing into a wiki, and build in Fatalsaints additonal intermediate Howto. I was thinking of doing the same, as I have been knocking up a simple calculator app as an example. I;ll use Fatalsaints example though, and will Windowize it as its clear you non linux blokes cant cope
__________________
N900_Email_Options Wiki Page
 

The Following 5 Users Say Thank You to mikec For This Useful Post:
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#63
It wouldn't do any harm to have the calculator example too, mikec, Im greedy for code

Im hoping somebody might make an example for game dev, I miss my easy-peasy symbian GameCanvas class. Possibly not in this thread, but maybe some simple examples using QT or pygame like tiling, animated sprite handling, keyboard input controls, yadda yadda would be brill
 

The Following 2 Users Say Thank You to kojacker For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#64
PyQt examples are your friend. You have (among many other goodies) both a calculator (widgets/calculator) and a canvas-based sprite animaton example (graphicsview/collidingmice).
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following User Says Thank You to attila77 For This Useful Post:
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#65
Originally Posted by attila77 View Post
PyQt examples are your friend. You have (among many other goodies) both a calculator (widgets/calculator) and a canvas-based sprite animaton example (graphicsview/collidingmice).
And just to save you doing a search. Once you have installed PyQt the examples live In:-

Windows

"Start" -> "All Programs" -> "PyQt GPL v4.x.x" -> "Examples Source" for many tutorials and examples ported from C++/QT to Python/PyQt.
__________________
N900_Email_Options Wiki Page
 

The Following 4 Users Say Thank You to mikec For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#66
...and if you're looking for them on the N900, they live under /usr/share/python2.5-qt4-doc/examples
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following 4 Users Say Thank You to attila77 For This Useful Post:
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#67
Thanks Atilla, I already had them and they are great to have.

It would still be nice to see these individual tutorials expand into other topics because I find I learn more from them. For example, from the examples pack what they lack (to me) is the specific focus on individual topics and the step by step/author's thoughts/reasoning/ability to ask questions like we can get here which helps so much with the "why we do" aswell as learning "what to do".

Aswell as the game dev topics mentioned earlier, I'd like to maybe see a quick tutorial on using PyQt to create/write to and read from a database on the device, capturing an image from the camera to store or use in an application, and other stuffs i cant think of at the mo'.
 

The Following User Says Thank You to kojacker For This Useful Post:
Posts: 13 | Thanked: 20 times | Joined on Dec 2009
#68
hi,
everything works fine for me. are there some examples to make a desktop widget with python and qt?
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#69
Here is a Python Calculator Example. A few things still not quite working but I figured you guys would want to fix the Bugs

Download from Here

http://www.megaupload.com/?d=ZCFJ99VS

Unzip the directory to get to the source code. Still very untidy from a Python beginner

Main Prog is ncalc.py
Ui File is in the UI directory called calc.ui (load up in qt designer to play with)

UI_calc.py is generated by pyuic4
calcstub.py contains all the program logic to handle the keys
copypaste.py is a stub file to handle menu options (not yet implemented)

To run on your N900 just type
$ python ncalc.py

Here is what you might get with the N900 shiny theme

__________________
N900_Email_Options Wiki Page

Last edited by mikec; 2010-02-08 at 22:07.
 

The Following 3 Users Say Thank You to mikec For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#70
heya... probably a stupid question....

But i understand the QT creator part (Just about) and can create a form/window screen bit.....
Is there any good tools for editing the python file? (Still struggling with the indents etc...)

Getting very confused searching for pyqt and tools....... i'm getting lost in the world of other languages/tools/code examples..... :| :|
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:57.