Oct-23-2022, 10:09 AM
(This post was last modified: Oct-23-2022, 10:27 AM by Yoriz.
Edit Reason: Added prefix
)
hi everybody
I have created an GUI with the QT designer and when i integrate it in the python IDE ( Pycharm or Visuel Studio)
I encounter the following error message " RuntimeError: You can't initialize an object twice!" and I can't understand what's the problem
please help me
the source code :
I have created an GUI with the QT designer and when i integrate it in the python IDE ( Pycharm or Visuel Studio)
I encounter the following error message " RuntimeError: You can't initialize an object twice!" and I can't understand what's the problem
please help me
the source code :
from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.uic import loadUiType from Custom_Widgets.Widgets import * from PySide2.QtWidgets import * import os import sys MainUi,_ =loadUiType('interface.ui') class Main(QMainWindow, MainUi): def __init__(self,parent=None): super(Main, self).__init__(parent) QMainWindow.__init__(self) self.setupUi(self) loadJsonStyle(self, self.ui) def main (): app=QApplication(sys.argv) window= Main() window.show() app.exec_() if __name__ == "__main__": main()