aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/doc/pysideversion.rst
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-22 16:44:51 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-22 18:22:49 +0200
commit427c7147d23fa21c6e8bd08407b1badc48b49c3c (patch)
treed2742c7ffdfa167bcf6e68f06ce7524bc441102d /sources/pyside2/doc/pysideversion.rst
parent4ec9cfa3c6b895c0cf50227c189cfa542de88b64 (diff)
move everying into sources/pyside2 (5.9 edition)
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.
Diffstat (limited to 'sources/pyside2/doc/pysideversion.rst')
-rw-r--r--sources/pyside2/doc/pysideversion.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/sources/pyside2/doc/pysideversion.rst b/sources/pyside2/doc/pysideversion.rst
new file mode 100644
index 000000000..3bcebe0da
--- /dev/null
+++ b/sources/pyside2/doc/pysideversion.rst
@@ -0,0 +1,31 @@
+Getting PySide and Qt version
+*****************************
+
+PySide exports their version numbers among the version of Qt used to compile PySide in a pythonnic way, you can check it using the variables:
+
+::
+
+ import PySide
+
+ # Prints PySide version
+ # e.g. 1.0.2
+ print PySide.__version__
+
+ # Gets a tuple with each version component
+ # e.g. (1, 0, 2, 'final', 1)
+ print PySide.__version_info__
+
+ # Prints the Qt version used to compile PySide
+ # e.g. "4.7.2"
+ print PySide2.QtCore.__version__
+
+ # Gets a tuple with each version components of Qt used to compile PySide
+ # e.g. (4, 7, 2)
+ print PySide2.QtCore.__version_info__
+
+
+Note that the Qt version used to compile PySide may differ from the version used to run PySide, to get the current running Qt version you can do:
+
+::
+
+ print PySide2.QtCore.qVersion()