Editing Python/Harmattan/Getting started with Harmattan Python
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 62: | Line 62: | ||
== Tasting PySide/QML == | == Tasting PySide/QML == | ||
- | If you have skipped any of the previous sections and have PySide installed you can see here an [ | + | If you have skipped any of the previous sections and have PySide installed you can see here an [http://developer.qt.nokia.com/wiki/Hello_World_in_PySide_and_QtQuick example] taken from PySide documentation website. |
- | [ | + | [http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html QML] is a declarative language designed to describe the user interface of a program: both what it looks like, and how it behaves. In QML, a user interface is specified as a tree of objects with properties. In this tutorial we will show how you can make a simple Hello World application with PySide and QML. |
A PySide/QML application consists, at least, of two different files – a file with the QML description of the user interface, and a python file which loads the qml file. To avoid problems for now, don’t forget to save both files in the same folder. | A PySide/QML application consists, at least, of two different files – a file with the QML description of the user interface, and a python file which loads the qml file. To avoid problems for now, don’t forget to save both files in the same folder. | ||
Line 122: | Line 122: | ||
If you are already familiar with PySide and have followed our tutorials, much of this code is already familiar. The only novelties is that you must import QDeclarativeView and set the source of the QDeclarativeView object to the URL of your QML file. Then, as any Qt widget, you call ''QDeclarativeView.show()''. | If you are already familiar with PySide and have followed our tutorials, much of this code is already familiar. The only novelties is that you must import QDeclarativeView and set the source of the QDeclarativeView object to the URL of your QML file. Then, as any Qt widget, you call ''QDeclarativeView.show()''. | ||
- | Take your time exploring this example. You can try to do basic things as changing the colors, the text, or set other properties to each element, setting a radius on the rectangle color. Check the elements and their properties in [ | + | Take your time exploring this example. You can try to do basic things as changing the colors, the text, or set other properties to each element, setting a radius on the rectangle color. Check the elements and their properties in [http://doc.qt.nokia.com/4.7/qdeclarativeelements.html QML Elements]. |
== Security framework for Python scripts == | == Security framework for Python scripts == |
Learn more about Contributing to the wiki.