PDA

View Full Version : GUI interaction with loops



Ini
9th March 2016, 15:40
Hello,

im constantly posting something into a QTextEdit via a loop. In the loop is atm a qwait of 1 ms but the gui is not really good available for interaction.

I think cause QTextEdit is just always painting something.

Whats the best way to solve this problem in qt?

thx

anda_skoa
9th March 2016, 17:28
"posting something" as in QTextEdit::append()?

Have you tried a simple timing, e.g. using QElapsedTimer how long that takes?

If you write "qwait" do you mean QTest::qwait(), i.e. in a unit test?

Cheers,
_

Ini
10th March 2016, 04:08
yes append

yes QTest::qwait()

dont know what to what to do with QElapsedTimer there.

anda_skoa
10th March 2016, 14:56
I meant measuring the time append() needs, but I think I misunderstood the problem.

Maybe you can rephrase what you are trying to do?

One one hand you have a unit test but you also mentioned UI interaction.

Cheers,
_