From 17a4a02354482045a0a8c1f3ec65c058d4b265ef Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 28 Apr 2011 16:33:25 -0300 Subject: Fix documentation bug 853 - "Provide constants for Qt and PySide version" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Marcelo Lira Renato Araújo --- doc/contents.rst | 1 + doc/pysideversion.rst | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 doc/pysideversion.rst diff --git a/doc/contents.rst b/doc/contents.rst index 691bce69f..c2ea806a2 100644 --- a/doc/contents.rst +++ b/doc/contents.rst @@ -21,6 +21,7 @@ Other stuff :maxdepth: 1 pysideapi2.rst + pysideversion.rst Module Index ============ diff --git a/doc/pysideversion.rst b/doc/pysideversion.rst new file mode 100644 index 000000000..23666b8ed --- /dev/null +++ b/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 PySide.QtCore.__version__ + + # Gets a tuple with each version components of Qt used to compile PySide + # e.g. (4, 7, 2) + print PySide.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 PySide.QtCore.qVersion() -- cgit v1.2.3