Created
May 6, 2013 16:08
-
-
Save andrefreitas/5526110 to your computer and use it in GitHub Desktop.
helloWorldQt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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