PDA

View Full Version : Widget for chat presentation



krivenok
24th January 2006, 13:11
Hello all!
I want to write chat dialog (similar to the ICQ's or Skype's dialog).
What widget can I use for chat presentation?
Requirements:
* Color text support
* Different text slyles support
* Hyperlinks support
* Simple text appending
I have seen QTextEdit and QTextBrowser documentation, but it is not good solution.
Thanks!

P.S.
OS : Windows XP
Compiler : gcc-3.4.3 (mingw)
QT : QT-4.1.0

high_flyer
24th January 2006, 13:32
I have seen QTextEdit and QTextBrowser documentation, but it is not good solution.
Thanks!
WHy not?
From QTextEdit docs:

QTextEdit is an advanced WYSIWYG viewer/editor supporting rich text formatting using HTML-style tags.
And QTextBrowser:

This class extends QTextEdit (in read-only mode), adding some navigation functionality so that users can follow links in hypertext documents.

wysota
24th January 2006, 13:59
I think most people use QListViews/QListBoxes for this with custom item handling.

krivenok
24th January 2006, 14:03
Because QTextBrowser hasn't any functions for simple text appending.

wysota
24th January 2006, 14:08
Because QTextBrowser hasn't any functions for simple text appending.

What about the "append(const QString &text);" slot?

krivenok
24th January 2006, 14:11
Yes - QString!
But I want to append color text, smiles, etc...

high_flyer
24th January 2006, 14:16
But I want to append color text, smiles, etc...
But you said simple text...

For smileis you could do it like many others, some character sequnses will be replaces with images, as for color text, that is not simple text but rich text.
Bare in mind, you will have to code some stuff your self you know...;)
You can't expect everything to be ready made by Qt...

krivenok
24th January 2006, 14:23
Does anyone know any Open Source, QT4-based applications or librarys with chat dialog?

wysota
24th January 2006, 14:37
Does anyone know any Open Source, QT4-based applications or librarys with chat dialog?

uuu.... you're trying to make it too easy for yourself! :P Try PSI, maybe they ported (or are porting) it to Qt4.