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
I read the code from class mu::notation::TimelineView and it looks like you do exactly the same that in previous examples. But if a put a breakpoint in mu::uicomponents::paint, the current thread is the main thread:
In widgetitem project, the paint function is launched from another thread:
My question is : how did you do to launch the paint function from the main thread ??
I found that adding qputenv("QT_QUICK_BACKEND", "software"); fix the problem but it's not a good solution.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Dear,
In my personal project, I would like to insert a QWidget in a QML window. I know that the Timeline in MuseScore is a QWidget.
I followed instruction from https://github.com/edelhirsch/widgetitem and https://www.qtdesktopdays.com/how-to-breathe-new-qml-life-into-a-qwidget-based-app-from-2000s . But I have error "Cannot send events to objects owned by a different thread" because the QWidget is created by the main thread and the QML renderer is launch in another thread.
I read the code from class
mu::notation::TimelineView
and it looks like you do exactly the same that in previous examples. But if a put a breakpoint inmu::uicomponents::paint
, the current thread is the main thread:In
widgetitem
project, thepaint
function is launched from another thread:My question is : how did you do to launch the
paint
function from the main thread ??I found that adding
qputenv("QT_QUICK_BACKEND", "software");
fix the problem but it's not a good solution.Thanks,
Beta Was this translation helpful? Give feedback.
All reactions