Reputation: 3824
I am implementing a Desktop Qt application which uses an XMPP library to chat. I am trying to find the best approach in terms of performance, easy to modify, add custom stuff (for instance, show a thumbnain if someone sends me an image)... I would like to know which approach do you think is the best: - Each element as a layout or widget and add them one by one (it seems to be slow) - ListWidget items overloading paint event (problem: don't know item height before painting) - Use a rich text widget and build the chat as a HTML page (didn't tried it yet) - ??
Best regards,
Upvotes: 2
Views: 635
Reputation: 1842
QListView would be good for simple IRC chat. If you are planning to implement some advanced text styling (different fonts, etc.) or images (like you said) WebView is the way to go. Additionally, much simpler way than QListView.
There's even an example Qt Google Chat project which uses QtWebKit: http://harmattan-dev.nokia.com/docs/library/html/qt4/webkit-googlechat.html
Upvotes: 3
Reputation: 4085
I would go for QListView with model attached and custom delegates etc..
Upvotes: 0