Editing User:Henkka

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 16: Line 16:
==Qt Designer/Python for Windows XP in 30 Mins==
==Qt Designer/Python for Windows XP in 30 Mins==
-
This is guide for noobs who would like to get started in Qt development using Python on Windows XP. The great news about using Python is there is no need to install the Maemo SDK. Python runs on Windows, MAC and Linux as is, and it's just a matter of copying your Python Scripts to your N900 and run.
+
This is guide for noobs who would like to get started in Qt development using Python on Windows XP. For Linux users I have created a separate thread Link
 +
The great news about using Python is there is no need to install the Maemo SDK. Python runs on Windows, MAC and Linux as is, and it's just a matter of copying your Python Scripts to your N900 and run.
===Install the Tools===
===Install the Tools===
-
* Get Python 2.6 from Python.org http://python.org/download/releases/2.6.4/ <br /> This will install the Python interpreter and associated tools. Access from your start menu:
+
* Get Python 2.6 from Python.org [http://python.org/download/releases/2.6.4/ here]. This will install the Python interpreter and associated tools. Access from your start menu:
:[[Image:Pic01_python_install.jpg]]
:[[Image:Pic01_python_install.jpg]]
-
* Get the Binary Packages for PyQt from Riverbank computing http://www.riverbankcomputing.co.uk/software/pyqt/download <br /> Select the Python 2.6 version which is the latest version compatible with Python on the N900. This will install a number of tools, but in particular the ones we are interested in for this Tutorial.
+
* Get the Binary Packages for PyQt from Riverbank computing [http://www.riverbankcomputing.co.uk/software/pyqt/download Here]. Select the Python 2.6 version which is the latest version compatible with Python on the N900. This will install a number of tools, but in particular the ones we are interested in for this Tutorial.
:* '''PyQt''' 4.7 The Python Qt bindings (note 4.7 is not the Qt Release version).
:* '''PyQt''' 4.7 The Python Qt bindings (note 4.7 is not the Qt Release version).
Line 34: Line 35:
Let's do a quick hello world that uses the above tools and links it all together.
Let's do a quick hello world that uses the above tools and links it all together.
-
 
===Create UI with Qt Designer===
===Create UI with Qt Designer===
Line 41: Line 41:
* Qt Designer from your start Menu.
* Qt Designer from your start Menu.
-
* Create a Main Window Form and set its size to '''800x400'''
+
* Create a Main Window Form ,set its size to '''800x400'''
* Add a Label Widget, set the font to a 24 point, resize as needed.
* Add a Label Widget, set the font to a 24 point, resize as needed.
* Double click on the Label Widget to change its name to Hello World ! Use Control R to see how it will look.
* Double click on the Label Widget to change its name to Hello World ! Use Control R to see how it will look.
Line 49: Line 49:
:[[Image:Qt_designer_winxp.jpg]]
:[[Image:Qt_designer_winxp.jpg]]
-
 
+
===Generate your Python code.===
-
===Generate your Python code===
+
Open a command window from your start menu->accessories (also winkey+r type '''cmd''') and cd into the directory where you stored the ui file, and type in the following.
Open a command window from your start menu->accessories (also winkey+r type '''cmd''') and cd into the directory where you stored the ui file, and type in the following.
Line 61: Line 60:
Just double Click your helloworld.py file in the file manager and presto you have your first PtQt app up and running.
Just double Click your helloworld.py file in the file manager and presto you have your first PtQt app up and running.
-
 
===Deploy to your N900===
===Deploy to your N900===
-
Make sure you have installed Python and PyQt on your n900. Easiest way of doing this is to install the ''PyQt examples and documentation'' package from the application manager. This will pull in all the dependencies that you will need. Don't forget you will need to [[Extras-devel#How_to_activate_Extras-devel|enable extras development repository]].
+
Make sure you have installed Python and PyQt on your n900. Easiest way of doing this is to install the PyQt documentation (package name and repository here) package from the application manager. This will pull in all the dependencies that you will need. Don't forget you will need to enable extras development repository (link here).
To get full file system access follow guide [http://talk.maemo.org/showpost.php?p=482844&postcount=1 Here]. ( this method uses WinSCP to do a secure copy to N900)
To get full file system access follow guide [http://talk.maemo.org/showpost.php?p=482844&postcount=1 Here]. ( this method uses WinSCP to do a secure copy to N900)
Line 71: Line 69:
After setting up your N900 and Windows run WinSCp and enter your ip address and root login details.
After setting up your N900 and Windows run WinSCp and enter your ip address and root login details.
-
To query your N900's ip address run in terminal (''sudo gainroot'' command comes with package rootsh):
+
To query your N900's ip address run in terminal:
  $ sudo gainroot
  $ sudo gainroot
Line 95: Line 93:
http://talk.maemo.org/showpost.php?p=515218&postcount=59
http://talk.maemo.org/showpost.php?p=515218&postcount=59
-
 
===Integrating into a Main Program===
===Integrating into a Main Program===
Line 135: Line 132:
Pyside is not quit ready for Windows yet
Pyside is not quit ready for Windows yet
-
(confusing what is this?)
 
'''Bringing it all together into a Graphical IDE'''
'''Bringing it all together into a Graphical IDE'''
-
Now you have your helloworld working it's time to dive into a full-blown IDE(Integrated development environment) (Wiki) and do a serious example.
+
Now you have your helloworld working its time to dive into a full-blown IDE(Integrated development environment) (Wiki) and do a serious example.
First we need to install an IDE that will pull all of our tools together. '''Eric4''' works really well with Qt Designer. Install from here
First we need to install an IDE that will pull all of our tools together. '''Eric4''' works really well with Qt Designer. Install from here

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)