Results 1 to 3 of 3

Thread: Signal/Slots, Where can i use it?

  1. #1
    Join Date
    Apr 2010
    Posts
    20
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Signal/Slots, Where can i use it?

    Hi all,

    What I need is to simply run a function or class in a thread, and I'd really like to use
    signals and slots to get some results back from the class.

    Am I correct in this, or is there a special class construction that will let me use signals and slots with QtConcurrent or QRunnable?

    Is it correct that I am limited to QThread if I want to use signals and slots?

    Thanks all and sorry anything

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Signal/Slots, Where can i use it?

    If You subclass QThread and use macro Q_OBJECT You can without any problem use signal and slot mechanism.

  3. The following user says thank you to Talei for this useful post:

    Tio (25th May 2010)

  4. #3
    Join Date
    Apr 2010
    Posts
    20
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Signal/Slots, Where can i use it?

    thanks Talei.
    I´ve done it. Did you know if is possible make it with QtConcurrent, ou QRunnable?

Similar Threads

  1. Signal and Slots
    By waynew in forum Newbie
    Replies: 3
    Last Post: 20th November 2009, 03:50
  2. add signal/slots at runtime?
    By oc2k1 in forum Qt Programming
    Replies: 10
    Last Post: 15th June 2009, 19:52
  3. how can i know how many slots connected to a signal?
    By yj_yulin in forum Qt Programming
    Replies: 6
    Last Post: 1st December 2008, 10:24
  4. signal and slots
    By vermarajeev in forum Qt Programming
    Replies: 4
    Last Post: 16th October 2007, 08:31
  5. Signal and slots
    By villy in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2007, 10:10

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