You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, April 12th 2007, 9:42pm

Displaying an animation in a treeview?

Is there anyway to display an animation next to an item in a QTreeView or QTreeWidget? I can see how to display static icons, but not animations. I need to show little spinners to indicate activity.

Many thanks,
Alex

Krasu

Intermediate

  • "Krasu" is male

Posts: 234

Location: Republic of Belarus

  • Send private message

2

Friday, April 13th 2007, 10:25am

RE: Displaying an animation in a treeview?

Well, create timer and change item's icon in timer event.

Animation in KFileTreeView class in KDE3 will be an excellent example:

http://websvn.kde.org/branches/KDE/3.5/kdelibs/kio/kfile/

Look at

Source code

1
2
3
KFileTreeView::slotAnimation()
KFileTreeView::startAnimation()
KFileTreeView::stopAnimation()

This post has been edited 1 times, last edit by "Krasu" (Apr 13th 2007, 10:39am)


3

Wednesday, April 18th 2007, 4:31pm

OK, thanks. I'll give it a try.