Hi,
I'm experimenting with qtjambi at the moment and I'm writing a little Jabberclient.
For the display of the roster (contact list) I'm using a QTreeWidget.
I've implemented a listener to react on any events which affect the roster:
public void presenceChanged(String user)
{
parent.setText(0, user);
getTree().addTopLevelItem(parent);
System.out.println(user);
}
public void presenceChanged(String user)
{
QTreeWidgetItem parent = new QTreeWidgetItem();
parent.setText(0, user);
getTree().addTopLevelItem(parent);
System.out.println(user);
}
To copy to clipboard, switch view to plain text mode
The listener itself is working correctly, but after initially connect to the server (so the listener is called >50times), my QTreeWidget is only showing the first 3-4 items. After clicking on the column-header for resorting the Tree-Items all Items were shown. So this seems to be a repaint-problem.
I've tried to add "getTree().repaint()" or "getTree().update()" within the listener, but none helped.
The debug-ouput is "QObject::connect: Cannot queue arguments of type 'QModelIndex'", but I have no idea if this is part of the problem above (I'm new to QT at all).
Any hints? Thx.
Greets,
Ace
Bookmarks