Re: Displaying Text Quickly
Are you using Qt3 or Qt4?
Anyway, store your text in some datastructure, be it a simple QString (or QStringList) for Qt3 or a QTextDocument in Qt4 and after you're done feeding it, just send it to QTextBrowser or simmilar. You can use setUpdatesEnabled(false) to disable widget updates if you don't want to send the text at once.
Re: Displaying Text Quickly
Thanks for the suggestion, I'll try that. Right now I'm putting about 1200 characters every 50 milliseconds into the text windows (qt 3.3), but writing it in 100 character increments. If I can somehow spool that up maybe it will work like I want to without causing performance issues. Thanks
Aaron
Re: Displaying Text Quickly
Wow you must be a fast reader ;)
Displaying the text that quickly wouldn't surprise me if it made the program sluggish. Do you need to display it or only to store it into a data structure?
Re: Displaying Text Quickly
I do have to display it eventually. I tried putting in a qtable without displaying it but I think the shear number of qtable operations was killing it. Is there an efficient way to store a lot of incoming text and then be able to display it without delay after the incoming text has finished? Like maybe qstring list like somebody suggested before? Thanks
Aaron
Re: Displaying Text Quickly
How are you receiving the data? It might be best to simply store a list(QStringList or QList<QByteArray>) of whatever you are receiving, and only join it together every certain time limit or when the data stops coming in. This will prevent copying data and doing screen update every 50 milliseconds. You could use a QTimer firing every 500ms or so to update the display, or just wait until until all the data is collected.
Re: Displaying Text Quickly
I queued up everything into a qstring list, and then write it to the textedit window--that seems to work great. However, if I add any rich text to it the scrolling becomes ridiculously slow (this is on a sun station, btw). Not sure if I can really do anything about that issue, unless there's some way to increase scrolling performance for text boxes (qt 3.3). Thanks everyone for all of your help so far.
Aaron