Results 121 to 140 of 154

Thread: How to use separate threads for pushbuttons in QT (like SwingWorker in Java)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #27
    Join Date
    Mar 2015
    Posts
    125
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to use separate threads for pushbuttons in QT (like SwingWorker in Java)

    "Inside that method you have another connect() -- I do understand as slot without connect() nothing means.
    Whether you connect to a slot in Lister or directly to the textview is up to you."
    --Indeed I need to define the slot of nested connect() in Lister.cpp, so I need to create Lister object again(or beforehand to be strict), and it will be out of created in main() so it would be the error as ever, or I need static slot with static textview -that is impossible.
    Ot I should simply use textview->setText(...), no Lister->textview->setText(...).
    Anyway --there is build in finished() signal in qthread as I wrote early, maybe it would be option.
    And I do not understand why
    Qt Code:
    1. void Lister::readthread() {
    2. textview->setText(Lister:path0);
    3. textview->setText("Lister::listed2");
    4. }
    To copy to clipboard, switch view to plain text mode 
    do not render path0 that is not empty and predefined in code. If it would work maybe I would check my previous option
    Last edited by artt; 6th January 2016 at 09:12.

Similar Threads

  1. Replies: 1
    Last Post: 1st April 2014, 08:48
  2. Destruction in separate threads
    By KevinKnowles in forum Qt Programming
    Replies: 3
    Last Post: 19th March 2012, 09:49
  3. Problem with QProcess in two separate threads
    By viheaho in forum Qt Programming
    Replies: 2
    Last Post: 18th March 2010, 22:52
  4. Replies: 1
    Last Post: 7th December 2009, 07:26
  5. Calling same method from separate threads
    By steg90 in forum Qt Programming
    Replies: 2
    Last Post: 19th July 2007, 08:55

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.