Skip to content

Instantly share code, notes, and snippets.

@zed
Created September 10, 2014 19:06
Show Gist options
  • Select an option

  • Save zed/b0576dcd90f0edd91f30 to your computer and use it in GitHub Desktop.

Select an option

Save zed/b0576dcd90f0edd91f30 to your computer and use it in GitHub Desktop.
#!/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