Created
September 10, 2014 19:06
-
-
Save zed/b0576dcd90f0edd91f30 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/python3 | |
| """Demonstrate that PySide can display Unicode characters. | |
| To install on Ubuntu: | |
| $ sudo apt-get install python3-pyside | |
| """ | |
| import PySide | |
| print(PySide.__version__) # 1.2.1 | |
| import PySide.QtCore | |
| print(PySide.QtCore.__version__) # 4.8.6 | |
| # From http://qt-project.org/wiki/Hello-World-in-PySide | |
| # Import PySide classes | |
| import sys | |
| from PySide.QtCore import * | |
| from PySide.QtGui import * | |
| # Create a Qt application | |
| app = QApplication(sys.argv) | |
| # Create a Label and show it | |
| label = QLabel("Привет \N{EARTH GLOBE EUROPE-AFRICA}") | |
| label.show() | |
| # Enter Qt application main loop | |
| app.exec_() | |
| sys.exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment