PDA

View Full Version : QTextDocument?



thomasjoy
13th August 2007, 12:22
Hi All,

I m using Qt 4.1.5 on my MAC.
I am obtaining a QString by comverting its text into hex form and then showing each item as a QTreeWidgetItem in which I have 4 columns and I m inserting the value row by row as--

FFD8 FFD9 ABCD DBAC
FAD8 F009 000A 0B0A
FFD8 FFD9 ABCD DBAC
FAD8 F009 000A 0B0A .......so on,

now since adding item in a QTreeWidget is slow and I m reading the text to be converted from file so it can be very large.
So I want to add them in another widget which will take this type of formatted text so Can i use QTextDocument?

or If any body knows other widget which is fast then plz reply with some code of doing it.

Thanks.

jpn
15th August 2007, 23:42
Well, at least I can say that QTreeWidget is definitely not the way to go. You should achieve way better performance with QTreeView plus a simple QAbstractTableModel which wraps a QByteArray.