diff --git a/README.md b/README.md index 22bd997..344b767 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a simple collapsable section for QT. It has been tested with QT5.6. Special thanks to "x squared" who has posted the original code for this idea at StackOverflow: http://stackoverflow.com/a/37119983/2573127 -A python version is available, using PyQt5, as Section.py. +A python version is available, using PyQt5 or PySide6, as Section.py. ## Sample Code diff --git a/Section.py b/Section.py index 952d509..4c36205 100644 --- a/Section.py +++ b/Section.py @@ -18,8 +18,12 @@ along with Elypson/qt-collapsible-section. If not, see . ''' -import PyQt5.QtCore as cr -import PyQt5.QtWidgets as wd +try: + import PySide6.QtCore as cr + import PySide6.QtWidgets as wd +except: + import PyQt5.QtCore as cr + import PyQt5.QtWidgets as wd # import PyQt5.QtGui as gui import sys