aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 21:19:07 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 21:19:07 +0200
commit91b93e1021ccc06d13e0d66a43bf7f9063faeff3 (patch)
treef5270164466b42367d4df63d723b3a4db4d7d0fe /examples
parentedae6185cef9c0ddd7c7c88bfa97c5043ba0d78a (diff)
parent06f97eca45ddadf4f04229cf14d5dc0bbd867316 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'examples')
-rw-r--r--examples/charts/chartthemes/ui_themewidget.py84
-rw-r--r--examples/installer_test/hello_app.spec9
-rw-r--r--examples/opengl/contextinfo.py121
-rw-r--r--examples/widgets/animation/easing/ui_form.py225
-rw-r--r--examples/xmlpatterns/schema/ui_schema.py122
5 files changed, 374 insertions, 187 deletions
diff --git a/examples/charts/chartthemes/ui_themewidget.py b/examples/charts/chartthemes/ui_themewidget.py
new file mode 100644
index 00000000..aa673eea
--- /dev/null
+++ b/examples/charts/chartthemes/ui_themewidget.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'themewidget.ui'
+##
+## Created by: Qt User Interface Compiler version 5.14.0
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+ QRect, QSize, QUrl, Qt)
+from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide2.QtWidgets import *
+
+class Ui_ThemeWidgetForm(object):
+ def setupUi(self, ThemeWidgetForm):
+ if ThemeWidgetForm.objectName():
+ ThemeWidgetForm.setObjectName(u"ThemeWidgetForm")
+ ThemeWidgetForm.resize(900, 600)
+ self.gridLayout = QGridLayout(ThemeWidgetForm);
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.horizontalLayout = QHBoxLayout();
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.themeLabel = QLabel(ThemeWidgetForm)
+ self.themeLabel.setObjectName(u"themeLabel")
+
+ self.horizontalLayout.addWidget(self.themeLabel);
+
+ self.themeComboBox = QComboBox(ThemeWidgetForm)
+ self.themeComboBox.setObjectName(u"themeComboBox")
+
+ self.horizontalLayout.addWidget(self.themeComboBox);
+
+ self.animatedLabel = QLabel(ThemeWidgetForm)
+ self.animatedLabel.setObjectName(u"animatedLabel")
+
+ self.horizontalLayout.addWidget(self.animatedLabel);
+
+ self.animatedComboBox = QComboBox(ThemeWidgetForm)
+ self.animatedComboBox.setObjectName(u"animatedComboBox")
+
+ self.horizontalLayout.addWidget(self.animatedComboBox);
+
+ self.legendLabel = QLabel(ThemeWidgetForm)
+ self.legendLabel.setObjectName(u"legendLabel")
+
+ self.horizontalLayout.addWidget(self.legendLabel);
+
+ self.legendComboBox = QComboBox(ThemeWidgetForm)
+ self.legendComboBox.setObjectName(u"legendComboBox")
+
+ self.horizontalLayout.addWidget(self.legendComboBox);
+
+ self.antialiasCheckBox = QCheckBox(ThemeWidgetForm)
+ self.antialiasCheckBox.setObjectName(u"antialiasCheckBox")
+ self.antialiasCheckBox.setChecked(False)
+
+ self.horizontalLayout.addWidget(self.antialiasCheckBox);
+
+ self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum);
+
+ self.horizontalLayout.addItem(self.horizontalSpacer);
+
+
+ self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 3);
+
+
+ self.retranslateUi(ThemeWidgetForm)
+ self.themeComboBox.currentIndexChanged.connect(ThemeWidgetForm.updateUI);
+ self.antialiasCheckBox.toggled.connect(ThemeWidgetForm.updateUI);
+ self.legendComboBox.currentIndexChanged.connect(ThemeWidgetForm.updateUI);
+ self.animatedComboBox.currentIndexChanged.connect(ThemeWidgetForm.updateUI);
+
+ QMetaObject.connectSlotsByName(ThemeWidgetForm)
+ # setupUi
+
+ def retranslateUi(self, ThemeWidgetForm):
+ self.themeLabel.setText(QCoreApplication.translate("ThemeWidgetForm", u"Theme:", None))
+ self.animatedLabel.setText(QCoreApplication.translate("ThemeWidgetForm", u"Animation:", None))
+ self.legendLabel.setText(QCoreApplication.translate("ThemeWidgetForm", u"Legend:", None))
+ self.antialiasCheckBox.setText(QCoreApplication.translate("ThemeWidgetForm", u"Anti-aliasing", None))
+ # retranslateUi
+
diff --git a/examples/installer_test/hello_app.spec b/examples/installer_test/hello_app.spec
index d096ab17..84d6d002 100644
--- a/examples/installer_test/hello_app.spec
+++ b/examples/installer_test/hello_app.spec
@@ -59,7 +59,14 @@ a = Analysis(['hello.py'],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
- excludes=[],
+ # 2019-04-28
+ # This hack circumvents a side effect of Python 2.7.16 which leads to a failure
+ # in 'hook-_tkinter.py'. The error is reported. Until it is fixed, we circumvent
+ # the problem by this exclude.
+ # This effect is triggered by installing 'numpy'. It is somewhat special since
+ # the problem does not show up in Python 3.7 . tkinter would have the same
+ # problem on Python 3.7, but numpy would not trigger it for some reason.
+ excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
diff --git a/examples/opengl/contextinfo.py b/examples/opengl/contextinfo.py
index f0ea345e..a963b895 100644
--- a/examples/opengl/contextinfo.py
+++ b/examples/opengl/contextinfo.py
@@ -41,10 +41,13 @@
"""PySide2 port of the opengl/contextinfo example from Qt v5.x"""
+from argparse import ArgumentParser, RawTextHelpFormatter
import numpy
import sys
+from textwrap import dedent
-from PySide2.QtCore import QLibraryInfo, QSize, QTimer, Qt
+
+from PySide2.QtCore import QCoreApplication, QLibraryInfo, QSize, QTimer, Qt
from PySide2.QtGui import (QMatrix4x4, QOpenGLBuffer, QOpenGLContext, QOpenGLShader,
QOpenGLShaderProgram, QOpenGLVertexArrayObject, QSurfaceFormat, QWindow)
from PySide2.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
@@ -61,50 +64,56 @@ except ImportError:
messageBox.exec_()
sys.exit(1)
-vertexShaderSource110 = """
-#version 110
-attribute highp vec4 posAttr;
-attribute lowp vec4 colAttr;
-varying lowp vec4 col;
-uniform highp mat4 matrix;
-void main() {
- col = colAttr;
- gl_Position = matrix * posAttr;
-}
-"""
-
-fragmentShaderSource110 = """
-#version 110
-varying lowp vec4 col;
-void main() {
- gl_FragColor = col;
-}
-"""
-
-vertexShaderSource = """
-#version 150
-in vec4 posAttr;
-in vec4 colAttr;
-out vec4 col;
-uniform mat4 matrix;
-void main() {
- col = colAttr;
- gl_Position = matrix * posAttr;
-}
-"""
-
-fragmentShaderSource = """
-#version 150
-in vec4 col;
-out vec4 fragColor;
-void main() {
- fragColor = col;
-}
-"""
+vertexShaderSource110 = dedent("""
+ // version 110
+ attribute highp vec4 posAttr;
+ attribute lowp vec4 colAttr;
+ varying lowp vec4 col;
+ uniform highp mat4 matrix;
+ void main() {
+ col = colAttr;
+ gl_Position = matrix * posAttr;
+ }
+ """)
+
+fragmentShaderSource110 = dedent("""
+ // version 110
+ varying lowp vec4 col;
+ void main() {
+ gl_FragColor = col;
+ }
+ """)
+
+vertexShaderSource = dedent("""
+ // version 150
+ in vec4 posAttr;
+ in vec4 colAttr;
+ out vec4 col;
+ uniform mat4 matrix;
+ void main() {
+ col = colAttr;
+ gl_Position = matrix * posAttr;
+ }
+ """)
+
+fragmentShaderSource = dedent("""
+ // version 150
+ in vec4 col;
+ out vec4 fragColor;
+ void main() {
+ fragColor = col;
+ }
+ """)
vertices = numpy.array([0, 0.707, -0.5, -0.5, 0.5, -0.5], dtype = numpy.float32)
colors = numpy.array([1, 0, 0, 0, 1, 0, 0, 0, 1], dtype = numpy.float32)
+
+def print_surface_format(surface_format):
+ profile_name = 'core' if surface_format.profile() == QSurfaceFormat.CoreProfile else 'compatibility'
+ return "{} version {}.{}".format(profile_name,
+ surface_format.majorVersion(), surface_format.minorVersion())
+
class RenderWindow(QWindow):
def __init__(self, format):
super(RenderWindow, self).__init__()
@@ -173,7 +182,11 @@ class RenderWindow(QWindow):
if self.timer is None:
self.timer = QTimer(self)
self.timer.timeout.connect(self.slotTimer)
+ if not self.timer.isActive():
self.timer.start(10)
+ else:
+ if self.timer and self.timer.isActive():
+ self.timer.stop()
def render(self):
if not self.context.makeCurrent(self):
@@ -184,7 +197,9 @@ class RenderWindow(QWindow):
functions.glClearColor(0, 0, 0, 1)
self.initGl()
- functions.glViewport(0, 0, self.width(), self.height())
+ retinaScale = self.devicePixelRatio()
+ functions.glViewport(0, 0, self.width() * retinaScale,
+ self.height() * retinaScale)
functions.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
self.program.bind()
@@ -217,10 +232,13 @@ class RenderWindow(QWindow):
if not self.context.makeCurrent(self):
raise Exception("makeCurrent() failed")
functions = self.context.functions()
- text = "Vendor: {}\nRenderer: {}\nVersion: {}\nShading language: {}".format(
+ text = """Vendor: {}\nRenderer: {}\nVersion: {}\nShading language: {}
+\nContext Format: {}\n\nSurface Format: {}""".format(
functions.glGetString(GL.GL_VENDOR), functions.glGetString(GL.GL_RENDERER),
functions.glGetString(GL.GL_VERSION),
- functions.glGetString(GL.GL_SHADING_LANGUAGE_VERSION))
+ functions.glGetString(GL.GL_SHADING_LANGUAGE_VERSION),
+ print_surface_format(self.context.format()),
+ print_surface_format(self.format()))
self.context.doneCurrent()
return text
@@ -243,6 +261,21 @@ class MainWindow(QWidget):
self.plainTextEdit.setPlainText(text)
if __name__ == '__main__':
+ parser = ArgumentParser(description="contextinfo", formatter_class=RawTextHelpFormatter)
+ parser.add_argument('--gles', '-g', action='store_true',
+ help='Use OpenGL ES')
+ parser.add_argument('--software', '-s', action='store_true',
+ help='Use Software OpenGL')
+ parser.add_argument('--desktop', '-d', action='store_true',
+ help='Use Desktop OpenGL')
+ options = parser.parse_args()
+ if options.gles:
+ QCoreApplication.setAttribute(Qt.AA_UseOpenGLES)
+ elif options.software:
+ QCoreApplication.setAttribute(Qt.AA_UseSoftwareOpenGL)
+ elif options.desktop:
+ QCoreApplication.setAttribute(Qt.AA_UseDesktopOpenGL)
+
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
diff --git a/examples/widgets/animation/easing/ui_form.py b/examples/widgets/animation/easing/ui_form.py
index 4ecf4858..515a4ee9 100644
--- a/examples/widgets/animation/easing/ui_form.py
+++ b/examples/widgets/animation/easing/ui_form.py
@@ -1,115 +1,152 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'form.ui'
-#
-# Created: Wed Feb 16 22:14:47 2011
-# by: pyside-uic 0.2.6 running on PySide 1.0.0~beta5
-#
-# WARNING! All changes made in this file will be lost!
+################################################################################
+## Form generated from reading UI file 'form.ui'
+##
+## Created by: Qt User Interface Compiler version 5.14.0
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+ QRect, QSize, QUrl, Qt)
+from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide2.QtWidgets import *
class Ui_Form(object):
def setupUi(self, Form):
- Form.setObjectName("Form")
+ if Form.objectName():
+ Form.setObjectName(u"Form")
Form.resize(545, 471)
- self.gridLayout = QtWidgets.QGridLayout(Form)
- self.gridLayout.setObjectName("gridLayout")
- self.easingCurvePicker = QtWidgets.QListWidget(Form)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
+ self.gridLayout = QGridLayout(Form);
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.easingCurvePicker = QListWidget(Form)
+ self.easingCurvePicker.setObjectName(u"easingCurvePicker")
+ sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(self.easingCurvePicker.sizePolicy().hasHeightForWidth())
self.easingCurvePicker.setSizePolicy(sizePolicy)
- self.easingCurvePicker.setMaximumSize(QtCore.QSize(16777215, 120))
- self.easingCurvePicker.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.easingCurvePicker.setMovement(QtWidgets.QListView.Static)
+ self.easingCurvePicker.setMaximumSize(QSize(16777215, 120))
+ self.easingCurvePicker.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+ self.easingCurvePicker.setMovement(QListView.Static)
self.easingCurvePicker.setProperty("isWrapping", False)
- self.easingCurvePicker.setViewMode(QtWidgets.QListView.IconMode)
+ self.easingCurvePicker.setViewMode(QListView.IconMode)
self.easingCurvePicker.setSelectionRectVisible(False)
- self.easingCurvePicker.setObjectName("easingCurvePicker")
- self.gridLayout.addWidget(self.easingCurvePicker, 0, 0, 1, 2)
- self.verticalLayout = QtWidgets.QVBoxLayout()
- self.verticalLayout.setObjectName("verticalLayout")
- self.groupBox_2 = QtWidgets.QGroupBox(Form)
- self.groupBox_2.setObjectName("groupBox_2")
- self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
- self.verticalLayout_2.setObjectName("verticalLayout_2")
- self.lineRadio = QtWidgets.QRadioButton(self.groupBox_2)
- self.lineRadio.setChecked(True)
- self.lineRadio.setObjectName("lineRadio")
- self.buttonGroup = QtWidgets.QButtonGroup(Form)
- self.buttonGroup.setObjectName("buttonGroup")
+
+ self.gridLayout.addWidget(self.easingCurvePicker, 0, 0, 1, 2);
+
+ self.verticalLayout = QVBoxLayout();
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.groupBox_2 = QGroupBox(Form)
+ self.groupBox_2.setObjectName(u"groupBox_2")
+ self.verticalLayout_2 = QVBoxLayout(self.groupBox_2);
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.lineRadio = QRadioButton(self.groupBox_2)
+ self.buttonGroup = QButtonGroup(Form)
+ self.buttonGroup.setObjectName(u"buttonGroup")
+ self.buttonGroup.setExclusive(False)
self.buttonGroup.addButton(self.lineRadio)
- self.verticalLayout_2.addWidget(self.lineRadio)
- self.circleRadio = QtWidgets.QRadioButton(self.groupBox_2)
- self.circleRadio.setObjectName("circleRadio")
+ self.lineRadio.setObjectName(u"lineRadio")
+ self.lineRadio.setChecked(True)
+
+ self.verticalLayout_2.addWidget(self.lineRadio);
+
+ self.circleRadio = QRadioButton(self.groupBox_2)
self.buttonGroup.addButton(self.circleRadio)
- self.verticalLayout_2.addWidget(self.circleRadio)
- self.verticalLayout.addWidget(self.groupBox_2)
- self.groupBox = QtWidgets.QGroupBox(Form)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
- self.groupBox.setSizePolicy(sizePolicy)
- self.groupBox.setObjectName("groupBox")
- self.formLayout = QtWidgets.QFormLayout(self.groupBox)
- self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
- self.formLayout.setObjectName("formLayout")
- self.label = QtWidgets.QLabel(self.groupBox)
- self.label.setObjectName("label")
- self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
- self.periodSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
+ self.circleRadio.setObjectName(u"circleRadio")
+
+ self.verticalLayout_2.addWidget(self.circleRadio);
+
+
+ self.verticalLayout.addWidget(self.groupBox_2);
+
+ self.groupBox = QGroupBox(Form)
+ self.groupBox.setObjectName(u"groupBox")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
+ sizePolicy1.setHorizontalStretch(0);
+ sizePolicy1.setVerticalStretch(0);
+ sizePolicy1.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
+ self.groupBox.setSizePolicy(sizePolicy1)
+ self.formLayout = QFormLayout(self.groupBox);
+ self.formLayout.setObjectName(u"formLayout")
+ self.formLayout.setFieldGrowthPolicy(QFormLayout.AllNonFixedFieldsGrow)
+ self.label = QLabel(self.groupBox)
+ self.label.setObjectName(u"label")
+
+ self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label);
+
+ self.periodSpinBox = QDoubleSpinBox(self.groupBox)
+ self.periodSpinBox.setObjectName(u"periodSpinBox")
self.periodSpinBox.setEnabled(False)
- self.periodSpinBox.setMinimum(-1.0)
- self.periodSpinBox.setSingleStep(0.1)
- self.periodSpinBox.setProperty("value", -1.0)
- self.periodSpinBox.setObjectName("periodSpinBox")
- self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.periodSpinBox)
- self.label_2 = QtWidgets.QLabel(self.groupBox)
- self.label_2.setObjectName("label_2")
- self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
- self.amplitudeSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
+ self.periodSpinBox.setMinimum(-1.000000000000000)
+ self.periodSpinBox.setSingleStep(0.100000000000000)
+ self.periodSpinBox.setValue(-1.000000000000000)
+
+ self.formLayout.setWidget(0, QFormLayout.FieldRole, self.periodSpinBox);
+
+ self.label_2 = QLabel(self.groupBox)
+ self.label_2.setObjectName(u"label_2")
+
+ self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label_2);
+
+ self.amplitudeSpinBox = QDoubleSpinBox(self.groupBox)
+ self.amplitudeSpinBox.setObjectName(u"amplitudeSpinBox")
self.amplitudeSpinBox.setEnabled(False)
- self.amplitudeSpinBox.setMinimum(-1.0)
- self.amplitudeSpinBox.setSingleStep(0.1)
- self.amplitudeSpinBox.setProperty("value", -1.0)
- self.amplitudeSpinBox.setObjectName("amplitudeSpinBox")
- self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.amplitudeSpinBox)
- self.label_3 = QtWidgets.QLabel(self.groupBox)
- self.label_3.setObjectName("label_3")
- self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3)
- self.overshootSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
+ self.amplitudeSpinBox.setMinimum(-1.000000000000000)
+ self.amplitudeSpinBox.setSingleStep(0.100000000000000)
+ self.amplitudeSpinBox.setValue(-1.000000000000000)
+
+ self.formLayout.setWidget(1, QFormLayout.FieldRole, self.amplitudeSpinBox);
+
+ self.label_3 = QLabel(self.groupBox)
+ self.label_3.setObjectName(u"label_3")
+
+ self.formLayout.setWidget(2, QFormLayout.LabelRole, self.label_3);
+
+ self.overshootSpinBox = QDoubleSpinBox(self.groupBox)
+ self.overshootSpinBox.setObjectName(u"overshootSpinBox")
self.overshootSpinBox.setEnabled(False)
- self.overshootSpinBox.setMinimum(-1.0)
- self.overshootSpinBox.setSingleStep(0.1)
- self.overshootSpinBox.setProperty("value", -1.0)
- self.overshootSpinBox.setObjectName("overshootSpinBox")
- self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.overshootSpinBox)
- self.verticalLayout.addWidget(self.groupBox)
- spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
- self.verticalLayout.addItem(spacerItem)
- self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1)
- self.graphicsView = QtWidgets.QGraphicsView(Form)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth())
- self.graphicsView.setSizePolicy(sizePolicy)
- self.graphicsView.setObjectName("graphicsView")
- self.gridLayout.addWidget(self.graphicsView, 1, 1, 1, 1)
+ self.overshootSpinBox.setMinimum(-1.000000000000000)
+ self.overshootSpinBox.setSingleStep(0.100000000000000)
+ self.overshootSpinBox.setValue(-1.000000000000000)
+
+ self.formLayout.setWidget(2, QFormLayout.FieldRole, self.overshootSpinBox);
+
+
+ self.verticalLayout.addWidget(self.groupBox);
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding);
+
+ self.verticalLayout.addItem(self.verticalSpacer);
+
+
+ self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1);
+
+ self.graphicsView = QGraphicsView(Form)
+ self.graphicsView.setObjectName(u"graphicsView")
+ sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0);
+ sizePolicy2.setVerticalStretch(0);
+ sizePolicy2.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth())
+ self.graphicsView.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.graphicsView, 1, 1, 1, 1);
+
self.retranslateUi(Form)
- QtCore.QMetaObject.connectSlotsByName(Form)
+
+ QMetaObject.connectSlotsByName(Form)
+ # setupUi
def retranslateUi(self, Form):
- Form.setWindowTitle(QtWidgets.QApplication.translate("Form", "Easing curves", None))
- self.groupBox_2.setTitle(QtWidgets.QApplication.translate("Form", "Path type", None))
- self.lineRadio.setText(QtWidgets.QApplication.translate("Form", "Line", None))
- self.circleRadio.setText(QtWidgets.QApplication.translate("Form", "Circle", None))
- self.groupBox.setTitle(QtWidgets.QApplication.translate("Form", "Properties", None))
- self.label.setText(QtWidgets.QApplication.translate("Form", "Period", None))
- self.label_2.setText(QtWidgets.QApplication.translate("Form", "Amplitude", None))
- self.label_3.setText(QtWidgets.QApplication.translate("Form", "Overshoot", None))
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Easing curves", None))
+ self.groupBox_2.setTitle(QCoreApplication.translate("Form", u"Path type", None))
+ self.lineRadio.setText(QCoreApplication.translate("Form", u"Line", None))
+ self.circleRadio.setText(QCoreApplication.translate("Form", u"Circle", None))
+ self.groupBox.setTitle(QCoreApplication.translate("Form", u"Properties", None))
+ self.label.setText(QCoreApplication.translate("Form", u"Period", None))
+ self.label_2.setText(QCoreApplication.translate("Form", u"Amplitude", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"Overshoot", None))
+ # retranslateUi
diff --git a/examples/xmlpatterns/schema/ui_schema.py b/examples/xmlpatterns/schema/ui_schema.py
index a5690c28..28084624 100644
--- a/examples/xmlpatterns/schema/ui_schema.py
+++ b/examples/xmlpatterns/schema/ui_schema.py
@@ -1,62 +1,88 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'schema.ui'
-#
-# Created: Fri Feb 5 15:27:54 2010
-# by: PyQt4 UI code generator snapshot-4.7.1-c39e85a8e2ec
-#
-# WARNING! All changes made in this file will be lost!
+################################################################################
+## Form generated from reading UI file 'schema.ui'
+##
+## Created by: Qt User Interface Compiler version 5.14.0
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+ QRect, QSize, QUrl, Qt)
+from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide2.QtWidgets import *
class Ui_SchemaMainWindow(object):
def setupUi(self, SchemaMainWindow):
- SchemaMainWindow.setObjectName("SchemaMainWindow")
+ if SchemaMainWindow.objectName():
+ SchemaMainWindow.setObjectName(u"SchemaMainWindow")
SchemaMainWindow.resize(417, 594)
- self.centralwidget = QtWidgets.QWidget(SchemaMainWindow)
- self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.schemaLabel = QtWidgets.QLabel(self.centralwidget)
- self.schemaLabel.setObjectName("schemaLabel")
- self.gridLayout.addWidget(self.schemaLabel, 0, 0, 1, 2)
- self.schemaSelection = QtWidgets.QComboBox(self.centralwidget)
- self.schemaSelection.setObjectName("schemaSelection")
- self.gridLayout.addWidget(self.schemaSelection, 0, 2, 1, 2)
- self.schemaView = QtWidgets.QTextBrowser(self.centralwidget)
- self.schemaView.setObjectName("schemaView")
- self.gridLayout.addWidget(self.schemaView, 1, 0, 1, 4)
- self.instanceLabel = QtWidgets.QLabel(self.centralwidget)
- self.instanceLabel.setObjectName("instanceLabel")
- self.gridLayout.addWidget(self.instanceLabel, 2, 0, 1, 2)
- self.instanceSelection = QtWidgets.QComboBox(self.centralwidget)
- self.instanceSelection.setObjectName("instanceSelection")
- self.gridLayout.addWidget(self.instanceSelection, 2, 2, 1, 2)
- self.instanceEdit = QtWidgets.QTextEdit(self.centralwidget)
- self.instanceEdit.setObjectName("instanceEdit")
- self.gridLayout.addWidget(self.instanceEdit, 3, 0, 1, 4)
- self.label = QtWidgets.QLabel(self.centralwidget)
- self.label.setObjectName("label")
- self.gridLayout.addWidget(self.label, 4, 0, 1, 1)
- self.validationStatus = QtWidgets.QLabel(self.centralwidget)
- self.validationStatus.setObjectName("validationStatus")
- self.gridLayout.addWidget(self.validationStatus, 4, 1, 1, 2)
- self.validateButton = QtWidgets.QPushButton(self.centralwidget)
- self.validateButton.setObjectName("validateButton")
- self.gridLayout.addWidget(self.validateButton, 4, 3, 1, 1)
+ self.centralwidget = QWidget(SchemaMainWindow)
+ self.centralwidget.setObjectName(u"centralwidget")
+ self.gridLayout = QGridLayout(self.centralwidget);
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.schemaLabel = QLabel(self.centralwidget)
+ self.schemaLabel.setObjectName(u"schemaLabel")
+
+ self.gridLayout.addWidget(self.schemaLabel, 0, 0, 1, 2);
+
+ self.schemaSelection = QComboBox(self.centralwidget)
+ self.schemaSelection.setObjectName(u"schemaSelection")
+
+ self.gridLayout.addWidget(self.schemaSelection, 0, 2, 1, 2);
+
+ self.schemaView = QTextBrowser(self.centralwidget)
+ self.schemaView.setObjectName(u"schemaView")
+
+ self.gridLayout.addWidget(self.schemaView, 1, 0, 1, 4);
+
+ self.instanceLabel = QLabel(self.centralwidget)
+ self.instanceLabel.setObjectName(u"instanceLabel")
+
+ self.gridLayout.addWidget(self.instanceLabel, 2, 0, 1, 2);
+
+ self.instanceSelection = QComboBox(self.centralwidget)
+ self.instanceSelection.setObjectName(u"instanceSelection")
+
+ self.gridLayout.addWidget(self.instanceSelection, 2, 2, 1, 2);
+
+ self.instanceEdit = QTextEdit(self.centralwidget)
+ self.instanceEdit.setObjectName(u"instanceEdit")
+
+ self.gridLayout.addWidget(self.instanceEdit, 3, 0, 1, 4);
+
+ self.label = QLabel(self.centralwidget)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout.addWidget(self.label, 4, 0, 1, 1);
+
+ self.validationStatus = QLabel(self.centralwidget)
+ self.validationStatus.setObjectName(u"validationStatus")
+
+ self.gridLayout.addWidget(self.validationStatus, 4, 1, 1, 2);
+
+ self.validateButton = QPushButton(self.centralwidget)
+ self.validateButton.setObjectName(u"validateButton")
+
+ self.gridLayout.addWidget(self.validateButton, 4, 3, 1, 1);
+
SchemaMainWindow.setCentralWidget(self.centralwidget)
- self.statusbar = QtWidgets.QStatusBar(SchemaMainWindow)
- self.statusbar.setObjectName("statusbar")
+ self.statusbar = QStatusBar(SchemaMainWindow)
+ self.statusbar.setObjectName(u"statusbar")
SchemaMainWindow.setStatusBar(self.statusbar)
self.retranslateUi(SchemaMainWindow)
- QtCore.QMetaObject.connectSlotsByName(SchemaMainWindow)
+
+ QMetaObject.connectSlotsByName(SchemaMainWindow)
+ # setupUi
def retranslateUi(self, SchemaMainWindow):
- SchemaMainWindow.setWindowTitle(QtWidgets.QApplication.translate("SchemaMainWindow", "XML Schema Validation", None))
- self.schemaLabel.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "XML Schema Document:", None))
- self.instanceLabel.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "XML Instance Document:", None))
- self.label.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "Status:", None))
- self.validationStatus.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "not validated", None))
- self.validateButton.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "Validate", None))
+ SchemaMainWindow.setWindowTitle(QCoreApplication.translate("SchemaMainWindow", u"XML Schema Validation", None))
+ self.schemaLabel.setText(QCoreApplication.translate("SchemaMainWindow", u"XML Schema Document:", None))
+ self.instanceLabel.setText(QCoreApplication.translate("SchemaMainWindow", u"XML Instance Document:", None))
+ self.label.setText(QCoreApplication.translate("SchemaMainWindow", u"Status:", None))
+ self.validationStatus.setText(QCoreApplication.translate("SchemaMainWindow", u"not validated", None))
+ self.validateButton.setText(QCoreApplication.translate("SchemaMainWindow", u"Validate", None))
+ # retranslateUi