I want to change the Window Title of my mainwindoThread. In debug mode it works but not when I start the program normal. I think i have to use Qmutex but I am very new in these topic. I tried it with Qmute but I dont know right how to lock and what I have to lock.
In my Mainwindow I execute this line:
self.menuprojects = class_menuprojects(self)
The class will be successfully creaed and on click_insertproject I will execute this:
def click_insertproject(self):
thread = generate_insert_frame(self.MainWindow)
thread.start()
And now I want to change my mainthrea mainwindow title to "test"
class generate_insert_frame(QThread):
def __init__(self, MainWindow):
QThread.__init__(self)
self.mutex = QMutex()
self.MainWindow = MainWindow
def run(self):
self.mutex.lock()
self.MainWindow.setWindowTitle("Test")
self.mutex.unlock()