Add warning about PySide 5.14, avoid a confusing error message that would appear with 5.14

This commit is contained in:
Luke Campagnola 2020-05-29 23:42:35 -07:00
parent d1c384876c
commit 9d1fbb6a3e
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import numpy as np
import pyqtgraph as pg
#QtGui.QApplication.setGraphicsSystem('raster')
app = QtGui.QApplication([])
app = pg.mkQApp()
mw = QtGui.QMainWindow()
mw.setWindowTitle('pyqtgraph example: PlotWidget')
mw.resize(800,800)

View File

@ -10,7 +10,7 @@ This module exists to smooth out some of the differences between PySide and PyQt
"""
import os, sys, re, time, subprocess
import os, sys, re, time, subprocess, warnings
from .python2_3 import asUnicode
@ -119,6 +119,8 @@ def _loadUiType(uiFile):
# convert ui file to python code
if pysideuic is None:
if PySide2.__version__[:5].split('.')[:2] == ['5', '14']:
warnings.warn('For UI compilation, it is recommended to upgrade to PySide >= 5.15')
uipy = subprocess.check_output(['pyside2-uic', uiFile])
else:
o = _StringIO()