Plasmoid-TreeView problem

David Edmundson david at davidedmundson.co.uk
Mon Jun 4 13:10:08 UTC 2012


On Mon, Jun 4, 2012 at 1:37 PM, Akos Toth <zuiadaton at gmail.com> wrote:
> Hi
>
> I created a plasmoid, that shows my BZFlag friends (people I liked to play
> with).
>
> When I place the plasmoid on the workspace, after I added some of my
> "friends", I'm trying scoll on treeview, the content is not changing, unless
> I resize the whole plasmoid. However if I iconify the plasmoid, and use it
> as a popup, treeview works well.
>
> I tried with QTreeView, and Plasma::TreeView same behaviour.
>
> One more thing:
> I use an BZFriendsTreeModel (inherits QAbstractItemModel), and it has an
> newIndexWidget signal, and when a new row is inserted this signal emitted,
> catched on the main(PlayerList) widget, and QTreeView::setIndexWidget()
> called.
>
> Here is the code:
> https://sourceforge.net/projects/bzfriendsplasm/files/Linux-KDE4/Alpha/
>
> Akos
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>

Just did a quick grep on your bzfriendstreemodel. You're not calling
dataChanged() anywhere.
Anytime you update an item in your model you need to tell the system
to redraw it by saying dataChanged(thisRow).

Dave


More information about the Plasma-devel mailing list