Results 1 to 4 of 4

Thread: GUI interaction with loops

  1. #1
    Join Date
    Nov 2015
    Posts
    67

    Default GUI interaction with loops

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: GUI interaction with loops

    "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,
    _

  3. #3
    Join Date
    Nov 2015
    Posts
    67

    Default Re: GUI interaction with loops

    yes append

    yes QTest::qwait()

    dont know what to what to do with QElapsedTimer there.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: GUI interaction with loops

    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,
    _

Similar Threads

  1. Event loops, Threads
    By schnudl in forum Newbie
    Replies: 1
    Last Post: 28th March 2015, 09:50
  2. Program loops at one line
    By Platoon in forum Newbie
    Replies: 7
    Last Post: 3rd October 2009, 16:02
  3. Message loops of different GUI toolkits
    By elizabeth.h1 in forum Qt Programming
    Replies: 4
    Last Post: 29th July 2009, 08:30
  4. Combining Event Loops
    By Gimpyfuzznut in forum Qt Programming
    Replies: 5
    Last Post: 10th July 2009, 06:08
  5. for loops in c++
    By baray98 in forum General Programming
    Replies: 16
    Last Post: 19th January 2009, 14:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.