[Qt-interest] mouse dragging and paintevent latency
Shi Yan
billconan at gmail.com
Tue Oct 20 00:16:31 CEST 2009
hello mail list,
i'm trying to implement a very simple 3D software, but i have a
problem about the mouse dragging even and the paintevent.
what i want to do is writing a widget that has four sub-windows,
dividing the working area into four. each sub-window is a QGLWidget.
if you have looked at 3D max, or anyother common 3D software, you
should have seen similar multiple view widget.
the bars that separate the view need to be adjustable via mouse, so i
implemented the mouse dragging event. once the user dragged the bar, i
re-set the position and size of the sub-windows (GLWidget), and call
update().
the problem is, the dragging and the paind event seem to have some
latency. when i drag the mouse, i can see the trace of subwindow
zooming. how can i let the dragging motion be more smooth? i know this
is a thing called double-buffering. but it should be on by default,
right?
and i also noticed that the dragging latency thing doesn't happen on
the qdockwidget. if i drag the Mainwindow::separator by the side of
the dock widget, i cannot see the dragging trace. everything is just
perfect. so i bet there should be a way to implement a smooth dragging
method. but how?
thank you very much.
More information about the Qt-interest-old
mailing list