Hello,
I just want to know
How can we give the Marching Ant effect to the Border of the QRect.
Can Anybody help me.?
Hello,
I just want to know
How can we give the Marching Ant effect to the Border of the QRect.
Can Anybody help me.?
Maybe set dash pattern for QPen to [ ant_length, ant_space ] and use QTimer to animate dash offset ?
me too thinking the same but,
if you have some hint then kindly share it with me.
so that I got some idea.
how to put the first step,
it will be definitely lead to some solution.
I already did. Keep the pen (with prepared dash pattern) as a member of some QObject-based class that will start the timer (maybe subclass of QGraphicsScene), and on each tick update the dash offset property of the pen. Next, assign this pen to your rect item and call rect->update(). If you move with the dash offset from 0 to ant_length + ant_space (and again from 0) it will look like the moving border, which is what you want to achieve, if I understood correctly.if you have some hint then kindly share it with me.
I won't give any code, until I see some of yours
Thanks man,
It works and I got what I want.
Thanks a lot man,
You helped me a lot yaar,
Thanks again,
In future also help if I post some problem,
okay.
Bookmarks