Add warning about PySide 5.14, avoid a confusing error message that would appear with 5.14
This commit is contained in:
parent
d1c384876c
commit
9d1fbb6a3e
@ -13,7 +13,7 @@ import numpy as np
|
|||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
|
|
||||||
#QtGui.QApplication.setGraphicsSystem('raster')
|
#QtGui.QApplication.setGraphicsSystem('raster')
|
||||||
app = QtGui.QApplication([])
|
app = pg.mkQApp()
|
||||||
mw = QtGui.QMainWindow()
|
mw = QtGui.QMainWindow()
|
||||||
mw.setWindowTitle('pyqtgraph example: PlotWidget')
|
mw.setWindowTitle('pyqtgraph example: PlotWidget')
|
||||||
mw.resize(800,800)
|
mw.resize(800,800)
|
||||||
|
@ -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
|
from .python2_3 import asUnicode
|
||||||
|
|
||||||
@ -119,6 +119,8 @@ def _loadUiType(uiFile):
|
|||||||
|
|
||||||
# convert ui file to python code
|
# convert ui file to python code
|
||||||
if pysideuic is None:
|
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])
|
uipy = subprocess.check_output(['pyside2-uic', uiFile])
|
||||||
else:
|
else:
|
||||||
o = _StringIO()
|
o = _StringIO()
|
||||||
|
Loading…
Reference in New Issue
Block a user