Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python open multiple .py windows

class HomeWindow(QMainWindow, Ui_HomeWindow):
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent=parent)
        self.setupUi(self)


class ValveSim(QMainWindow, Ui_ValveSim):
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent=parent)
        self.setupUi(self)


class Win1(QMainWindow, Ui_MainWindow):
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent=parent)
        self.setupUi(self)
        self.vs = ValveSim()
        self.hw = HomeWindow()
        self.CreateValveSimulator()
        self.CreateWindow()

    def CreateValveSimulator(self):
        subwindow = QMdiSubWindow()
        subwindow.setWidget(self.vs)
        self.mdiArea.addSubWindow(subwindow)
        subwindow.setFixedSize(500, 500)
        # self.subwindow.close()

    def CreateWindow(self):
        self.hw.pushButton.clicked.connect(self.vs.showNormal)
        subwindow = QMdiSubWindow()
        subwindow.setWindowFlags(Qt.CustomizeWindowHint | Qt.Tool)
        subwindow.setWidget(self.hw)
        self.mdiArea.addSubWindow(subwindow)
Comment

PREVIOUS NEXT
Code Example
Python :: python subtract days from date 
Python :: subplots whitespace 
Python :: for loop to create a set of counters in python 
Python :: decorator patter 
Python :: django models get all 
Python :: python class to tuple 
Python :: python compiler and shell online 
Python :: Dynamically limiting queryset of related field 
Python :: django queryset with multiple contain keyword 
Python :: Python - Cara Memisahkan String Berdasarkan Beberapa Delimiter 
Python :: how to import autpy 
Python :: find las element of array python 
Python :: numpy array majority and how many 
Python :: sample one point from distribution python 
Python :: grandest staircase foobar 
Python :: start a webservice quickly using python2.7 
Python :: python3 subprocess getoutput 
Python :: semaphore example in python 
Python :: Python Print Variable Using the String Formatting with the help of % character 
Python :: pil 
Python :: how to convert a sentence into a list of words in python 
Python :: computecost pyspark 
Python :: jsonpickle exclude py/object 
Python :: slice in iloc 
Python :: Reset Python Dictionary to 0 Zero. Empty existing Python Dictionary 
Python :: How to multiply a text in python 
Python :: spacegoat meaning 
Python :: Freqtrade - Informative Pairs 
Python :: dataset analysis in python photo photoelectric effect 
Python :: python which __divs__ are there 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =