A severe delay occurs when the QScrollBar is dragged by the user or received a wheel event.
-
When you output a string to QPlaintextedit and then you arrived the vertical range of QPlaintextedit, a scroll bar is created.
In that state, when the user drags the scroll bar, it stops for 1 to 2 seconds and the scroll bar follows the mouse.How do we solve this?
-
Hi and welcome to devnet,
Which version of Qt ?
On which OS ?
On which device ? -
@SGaist First, I'm sorry I didn't speak English well. The qt version is 4.8.7! OS is centos7. The process of manufacturing UI tools in PC includes dbus communication between applications on the core program and PC, and socket communication with embedded boards connected to the core program and PC. QScrollBar not only freezes, but all UI objects are frozen in some sequence processes.
I tried qApp->processevent().
I also cut off the dbus. -
@keyboard_hellchang
If you usesleep()
anywhere in your code you deserve what you get, so don't, ever. Not to mention, nobody can possibly know that you have. -
Since you have it working now, please mark your thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so that other forum users may know a solution has been found :-)