其实我建议lz还是做个计时算下
QTime startTime = QTime::currentTime();
//your function
QTime endTime = QTime::currentTime();
qDebug()<<" elapse time is "<< startTime.msecsTo(endTime);
单位是毫秒
Qt助手上说
Note that QLabel is well-suited to display small rich text documents, such as small documents that get their document specific settings (font, text color, link color) from the label's palette and font properties. For large documents, use QTextEdit in read-only mode instead. QTextEdit can also provide a scroll bar when necessary.
每次setText()会清掉以前的数据,然后显示新数据,如果数据少是没问题的(个人感觉数据量小定义为几十KB或更大),数据大的话推荐QTextEdit,但看你的代码,不是数据量大小的问题。
setText()如果你的Qlabel和别的widget有关联,看是否会引起其他的地方重绘,这个是关键