UI blocking during update from slot
-
@Nubcake said in UI blocking during update from slot:
How do you signal the view to update the change in the model? -
@Nubcake some more code snippet is required to answer what is wrong in GUI update.
treeModel construction and setup with view. -
Don't use a convenience model when you want to upgrade stuff that often. Also reduce the update rate - noone can see this in the view so it's not necessary.
-
Don't use a convenience model when you want to upgrade stuff that often. Also reduce the update rate - noone can see this in the view so it's not necessary.
@Christian-Ehrlicher Could you explain what you mean by "convenience model"?
How often should I update the view would you suggest? -
QStandardItemModel is a convenience model optimized for general usage but not for mass (update) data. Use QAbstractItemModel instead.
I don't know how often you should update your ui - but 100 updates per second is for sure not needed and to much. -
QStandardItemModel is a convenience model optimized for general usage but not for mass (update) data. Use QAbstractItemModel instead.
I don't know how often you should update your ui - but 100 updates per second is for sure not needed and to much.@Christian-Ehrlicher I've added
QThread::msleep(50)just after emitting the signal to update the UI in the worker thread and it's more responsive as one would expect.However I'm not fond of blocking the worker thread to allow the GUI to become responsive. Is there better way to limit the amount of signals I send to the UI without sleeping the worker thread?
-
@Christian-Ehrlicher I've added
QThread::msleep(50)just after emitting the signal to update the UI in the worker thread and it's more responsive as one would expect.However I'm not fond of blocking the worker thread to allow the GUI to become responsive. Is there better way to limit the amount of signals I send to the UI without sleeping the worker thread?