我使用PyQt来显示检测结果。我有两个线程,一个是Ui_MainWindow ui,一个是QThread detect。我得到了检测结果(一个浮点数),并希望在detect.run中使用ui.QProgressBar.setValue(结果),但它有时会导致错误。QPainter::begin: A paint device can only be painted by one painter at a time.我搜索了这个问题,发现我不能在GUI线程之外使用setValue。一些答
在没有参数的情况下调用方法是有效的。但是,将前面的问题扩展到带有参数的方法上,我又回到了失败的境地。(t, 'dup')
QtCore.QMetaObject.invokeMethod(t, 'beep', QtCore.Qt.AutoConnection, QtCore.QGenericArgument::invokeMethod: No such method Ex