Results 1 to 7 of 7

Thread: use Thread update many GUI

  1. #1
    Join Date
    Oct 2011
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default use Thread update many GUI

    Hello, every one. I'm Phuong, I come from VietNam. I have a problem: I have a thread and I want to update many interface by signal and slot? my thread is a
    variable(public) in interface 1, and I have function(public) getThread() to return this thread. And I want to update interface 2 use this thread(by signal and slot). But it is not update? Can you tell me solve?
    Thanks!

  2. #2
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: use Thread update many GUI

    see my sig.


    Maybe you just want to use moveToThread() method? All slots are invoked in the slot's instance's thread.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Oct 2011
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: use Thread update many GUI

    Thank you for reply. I'm new member of QT, My English so bad! I still use a thread but, this thread is not an attribute of interface 1, I define it as a global variable( can use for many class), and this thread is updated two interface. Thanks for reply!

  4. #4
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: use Thread update many GUI

    see my sig.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  5. #5
    Join Date
    Oct 2011
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: use Thread update many GUI

    I have a question. I use one thread update many object GUI. But this thread have only update a gui. If I have n object want to update gui, Should I have n thread? Help me!

  6. #6
    Join Date
    Nov 2011
    Posts
    1
    Platforms
    Windows

    Default Re: use Thread update many GUI

    hello for all, i tried to do a thread with qt haw i can display a videocam like this picture !!someone can help me please interface.jpg

  7. #7
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: use Thread update many GUI

    What is you question?

    Did you look at http://www.qtcentre.org/wiki/index.p...I_from_QThread
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. Using QWidget::update() from non-GUI thread
    By some_birdie in forum Qt Programming
    Replies: 3
    Last Post: 21st June 2011, 09:11
  2. Update GUI in a thread
    By olivier1978 in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2011, 21:33
  3. Update GUI from another thread
    By Anne in forum Qt Programming
    Replies: 9
    Last Post: 14th July 2010, 15:08
  4. update a wigdet in a thread is no allow?
    By lanmanck in forum Qt Programming
    Replies: 8
    Last Post: 25th October 2009, 03:05
  5. update widget from separate thread
    By method in forum Qt Programming
    Replies: 5
    Last Post: 10th July 2009, 14:33

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.