Skip to content

Instantly share code, notes, and snippets.

@andrefreitas
Created May 6, 2013 16:08
Show Gist options
  • Save andrefreitas/5526110 to your computer and use it in GitHub Desktop.
Save andrefreitas/5526110 to your computer and use it in GitHub Desktop.
helloWorldQt
import sys
from PyQt4.QtGui import QApplication
from PyQt4.QtDeclarative import QDeclarativeView
from PyQt4.QtCore import QUrl
app = QApplication(sys.argv)
view = QDeclarativeView()
view.setSource(QUrl('hello.qml'))
view.show()
view.setWindowTitle("Hello World")
app.exec_()
import QtQuick 1.0
Text{
text:"Hello world"
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.bold: true
font.pointSize: 13
width:220
height:30
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment