I use QTextEdit, and I update the text (in particular setHTML) at a speed of 1 Hz.
Initially, the method setHTMLworks quickly (only a few ms); but after 12 hours of work setHTML, 256 ms is required to return , the data is a simple table with 5 columns and 10 rows.
This increase lasts longer than the program runs.
Does anyone understand what is happening? And, more importantly, how can I make him stop?
Basically what I do:
boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::universal_time();
display->setHtml(text);
boost::posix_time::ptime end_time = boost::posix_time::microsec_clock::universal_time();
boost::posix_time::time_duration time_diff = end_time - start_time;
m_renderTimeDebug = double(time_diff.fractional_seconds() / 1000 );
std::cout << "DRAW TIME; took " << m_renderTimeDebug << " ms " << std::endl;
Example here link
source
share