Display lots of text fast
Hi,
I would like to display lots of text line ( file path ) as fast as possible.
I would implement a directory content display and I would display the content ( the file list recursively ) in a fast way.
Which Qwidget can I use? The directory can also contain 10E6 files.
Best Regards,
Franco
Re: Display lots of text fast
Is there a reason you want to display lots of text fast? If your using the same area, then people are not going to be able to read it all anyway, so why not update much slower? As in, forget about displaying every filename, just show the latest (or update a file listing with the latest) 10 times a second or so and reduce cpu usage.
Maybe a QTableModel will be best for you, but updating it hundreds of times a second will quickly consume all cpu usage with gui updates.
Re: Display lots of text fast
Quote:
Originally Posted by
fatjuicymole
Is there a reason you want to display lots of text fast? If your using the same area, then people are not going to be able to read it all anyway, so why not update much slower? As in, forget about displaying every filename, just show the latest (or update a file listing with the latest) 10 times a second or so and reduce cpu usage.
Maybe a QTableModel will be best for you, but updating it hundreds of times a second will quickly consume all cpu usage with gui updates.
Hi people don't have to read the text.
I have a code that list recursively the content of a big directory and I would show the file list in some QWidget
Re: Display lots of text fast
Quote:
Originally Posted by
fatjuicymole
Is there a reason you want to display lots of text fast? If your using the same area, then people are not going to be able to read it all anyway, so why not update much slower? As in, forget about displaying every filename, just show the latest (or update a file listing with the latest) 10 times a second or so and reduce cpu usage.
Maybe a QTableModel will be best for you, but updating it hundreds of times a second will quickly consume all cpu usage with gui updates.
QTableModel seems more complex than what I need.
I think I only need some log widget
Re: Display lots of text fast
Quote:
Originally Posted by
franco.amato
I would show the file list in some QWidget
But why do you need to show it if people don't need to read it?
Re: Display lots of text fast
QTextEdit would more closely a log widget, but you asked for performance, and QTableModel would be better in that case, as you provide the data the user can see at the time rather than adding every line.
Re: Display lots of text fast
I would use QPlainTextEdit as it is faster and more simple QTextEdit version.