You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
JVM crashes when child thread executes custom signal .emit() to update content
Expected behavior
Request the web page in the child thread and return the data, output the data to the form
Screenshots
Additional context
newQThread(){
@Overridepublicvoidrun(){
//Request a web page and get the return value
.......
// customsignal.emit()customsignal.emit()
}
}.start();
================================================
//customsignal executetablewidget.setItem(0,0, QTableWidgetItem(Thevaluereturnedbythepage)) // program crashes here
The text was updated successfully, but these errors were encountered:
newQThread(){
@Overridepublicvoidrun(){
//Request a web page and get the return value
.......
tablewidget.setItem(0,0, QTableWidgetItem("test")) // program crashes here
}
}.start();
QTTablewidget.setItem() is thread affine, i.e. you cannot use it outside the main thread.
The method throws an QThreadAffinityException. The application crashes because QThread.run() must not throw any exceptions.
Describe the bug
JVM crashes when child thread executes custom signal .emit() to update content
Expected behavior
Request the web page in the child thread and return the data, output the data to the form
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: