When I import objects, the position of the window will be forced to the center
mycode
class MainWindow(QtWidgets.QDialog):
def __init__(self, project_path, parent = qtmax.GetQMaxMainWindow()):
super(MainWindow, self).__init__(parent)
self.init_varius(project_path)
# self.setWindowFlags(QtCore.Qt.Window)
self.setWindowTitle("工具管理")
self.setWindowIcon(QtGui.QIcon(self.project_path + "/icon/" + "tool.png"))
self.setMinimumSize(100, 120)
self.resize(170,550)
# self.setWindowOpacity(0.5)
self.create_widgets()
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
do you have a callback that is regenerating the ui on import?
I change parent class, “QtWidgets.QMainWindow”, It seems that “QtWidgets.QDialog” cannot be used