pyqtgraph/examples/exampleLoaderTemplate_pyside2.py
Ogi Moore 7e57e07068
example app now works with Qt4 and Python2 again (#1302)
* example app now workw with Qt4 and Python2 again

* Example App is now part of the test suite

* Add initExample

* No scary warning when launching examples

* Fix scary examples.__main__ warning

* Use courier new font as its on all platforms

* Remove commented out code

* Add newline

* Updated docs, example app now tested

* Non-relative import for example app

* Proper importing now
2020-10-19 11:51:12 -07:00

130 lines
5.3 KiB
Python

# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'exampleLoaderTemplate.ui'
##
## Created by: Qt User Interface Compiler version 5.15.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide2.QtCore import (QCoreApplication, QDate, QDateTime, QMetaObject,
QObject, QPoint, QRect, QSize, QTime, QUrl, Qt)
from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QKeySequence, QLinearGradient, QPalette, QPainter,
QPixmap, QRadialGradient)
from PySide2.QtWidgets import *
class Ui_Form(object):
def setupUi(self, Form):
if not Form.objectName():
Form.setObjectName(u"Form")
Form.resize(846, 552)
self.gridLayout_2 = QGridLayout(Form)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.splitter = QSplitter(Form)
self.splitter.setObjectName(u"splitter")
self.splitter.setOrientation(Qt.Horizontal)
self.widget = QWidget(self.splitter)
self.widget.setObjectName(u"widget")
self.gridLayout = QGridLayout(self.widget)
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.exampleTree = QTreeWidget(self.widget)
__qtreewidgetitem = QTreeWidgetItem()
__qtreewidgetitem.setText(0, u"1");
self.exampleTree.setHeaderItem(__qtreewidgetitem)
self.exampleTree.setObjectName(u"exampleTree")
self.exampleTree.header().setVisible(False)
self.gridLayout.addWidget(self.exampleTree, 0, 0, 1, 2)
self.graphicsSystemCombo = QComboBox(self.widget)
self.graphicsSystemCombo.addItem("")
self.graphicsSystemCombo.addItem("")
self.graphicsSystemCombo.addItem("")
self.graphicsSystemCombo.addItem("")
self.graphicsSystemCombo.setObjectName(u"graphicsSystemCombo")
self.gridLayout.addWidget(self.graphicsSystemCombo, 2, 1, 1, 1)
self.qtLibCombo = QComboBox(self.widget)
self.qtLibCombo.addItem("")
self.qtLibCombo.addItem("")
self.qtLibCombo.addItem("")
self.qtLibCombo.addItem("")
self.qtLibCombo.addItem("")
self.qtLibCombo.setObjectName(u"qtLibCombo")
self.gridLayout.addWidget(self.qtLibCombo, 1, 1, 1, 1)
self.label_2 = QLabel(self.widget)
self.label_2.setObjectName(u"label_2")
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.label = QLabel(self.widget)
self.label.setObjectName(u"label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
self.loadBtn = QPushButton(self.widget)
self.loadBtn.setObjectName(u"loadBtn")
self.gridLayout.addWidget(self.loadBtn, 3, 1, 1, 1)
self.splitter.addWidget(self.widget)
self.widget1 = QWidget(self.splitter)
self.widget1.setObjectName(u"widget1")
self.verticalLayout = QVBoxLayout(self.widget1)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.loadedFileLabel = QLabel(self.widget1)
self.loadedFileLabel.setObjectName(u"loadedFileLabel")
font = QFont()
font.setBold(True)
font.setWeight(75)
self.loadedFileLabel.setFont(font)
self.loadedFileLabel.setAlignment(Qt.AlignCenter)
self.verticalLayout.addWidget(self.loadedFileLabel)
self.codeView = QPlainTextEdit(self.widget1)
self.codeView.setObjectName(u"codeView")
font1 = QFont()
font1.setFamily(u"Courier New")
self.codeView.setFont(font1)
self.verticalLayout.addWidget(self.codeView)
self.splitter.addWidget(self.widget1)
self.gridLayout_2.addWidget(self.splitter, 0, 0, 1, 1)
self.retranslateUi(Form)
QMetaObject.connectSlotsByName(Form)
# setupUi
def retranslateUi(self, Form):
Form.setWindowTitle(QCoreApplication.translate("Form", u"PyQtGraph", None))
self.graphicsSystemCombo.setItemText(0, QCoreApplication.translate("Form", u"default", None))
self.graphicsSystemCombo.setItemText(1, QCoreApplication.translate("Form", u"native", None))
self.graphicsSystemCombo.setItemText(2, QCoreApplication.translate("Form", u"raster", None))
self.graphicsSystemCombo.setItemText(3, QCoreApplication.translate("Form", u"opengl", None))
self.qtLibCombo.setItemText(0, QCoreApplication.translate("Form", u"default", None))
self.qtLibCombo.setItemText(1, QCoreApplication.translate("Form", u"PyQt4", None))
self.qtLibCombo.setItemText(2, QCoreApplication.translate("Form", u"PySide", None))
self.qtLibCombo.setItemText(3, QCoreApplication.translate("Form", u"PyQt5", None))
self.qtLibCombo.setItemText(4, QCoreApplication.translate("Form", u"PySide2", None))
self.label_2.setText(QCoreApplication.translate("Form", u"Graphics System:", None))
self.label.setText(QCoreApplication.translate("Form", u"Qt Library:", None))
self.loadBtn.setText(QCoreApplication.translate("Form", u"Run Example", None))
self.loadedFileLabel.setText("")
# retranslateUi