Results 1 to 3 of 3

Thread: [help] How to start/stop updating widget members using QButton?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: [help] How to start/stop updating widget members using QButton?

    However, I need to delegate this process to separated threads/process/events
    Why is that?

    I am not quite sure I follow on what you are trying to do:
    you have a buttong with which you want to start a new thread?
    And you want to update your QTextEdit from that thread?

    If this is the case, you can just start/stop the thread in the slot connected to the button.
    And you can connect a signal from the thread to the QTextEdit::setText() slot.
    Last edited by high_flyer; 27th April 2011 at 11:19.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. #2
    Join Date
    Apr 2011
    Location
    Indonesia, Jakarta
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: [help] How to start/stop updating widget members using QButton?

    Thanks for the reply and sorry I've just read it now.

    Yes, thanks now I know that actually slot is running on separate thread from main gui thread. Previously I think that if I go indefinite loop in the slot connected to button signal then the gui will stuck. Anyway I used QTimer for my purpose, so I can change the interval of the update whenever I want.

    Thanks.

Similar Threads

  1. Listwidgetitem text is chpopped while updating widget
    By sudhansu in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2010, 15:37
  2. Tree widget not updating the data
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 17th November 2009, 07:00
  3. updating a widget's display
    By jhearon in forum Qt Programming
    Replies: 5
    Last Post: 10th November 2008, 16:59
  4. Replies: 11
    Last Post: 7th September 2006, 23:15
  5. Replies: 21
    Last Post: 13th March 2006, 14:05

Tags for this Thread

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.