Results 1 to 3 of 3

Thread: Problem in updating text in QTextEdit control

  1. #1
    Join Date
    Feb 2011
    Posts
    36
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem in updating text in QTextEdit control

    Hi Experts,

    In my application, I want to update my conversion process to user. So i thought of using QTextEdit. I know how to insert, append & setText using it. But the problem here is after inserting or appending the text, my dialog is not getting updated. It prints all data at the end of function.

    Could you tell me how to update text dynamically in QTextEdit or any other control can be used. Say i will append some 10 lines of text at certain areas in my code. But i want them to be displayed after every insert now and then in the control. But the function call will end after completing my conversion process and updating the text.

    Thanks,
    Sankar.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Problem in updating text in QTextEdit control

    Just a guess - probably you need to process events:
    Qt Code:
    1. textEdit->append("text");
    2. qApp->processEvents();
    To copy to clipboard, switch view to plain text mode 
    Here is very good article: Responsive GUI
    Show the code so it'll be easier to help.

  3. #3
    Join Date
    Feb 2011
    Posts
    36
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem in updating text in QTextEdit control

    Thanks stampede.

    It worked as expected.

Similar Threads

  1. Problem finding text in a QTextEdit
    By Vash5556 in forum Qt Programming
    Replies: 8
    Last Post: 18th May 2009, 14:19
  2. Problem pasting text into a QTextEdit
    By Spockmeat in forum Qt Programming
    Replies: 8
    Last Post: 14th March 2009, 14:36
  3. Replies: 2
    Last Post: 30th December 2008, 21:35
  4. updating text in QTextEdit [SOLVED]
    By me_here_me in forum Qt Programming
    Replies: 3
    Last Post: 25th September 2007, 15:01
  5. Problem with inserting text into QTextEdit
    By xorrr in forum Qt Programming
    Replies: 0
    Last Post: 6th February 2006, 11:45

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.