Results 1 to 3 of 3

Thread: Doubts on signal and slots

  1. #1
    Join Date
    Jun 2011
    Posts
    8
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Doubts on signal and slots

    Hi all,

    I am working with JAVA build of QT. here when i searching in this forum all queries related to c and c++. so i am finding it difficult to understand it.

    QObject::connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(function(int, bool)));

    can any 1 explains me the meaning of this statement. and can help me how i can implement same thing into java. can any1 temme what is the equivalent classes in JAVA.

    Thanks in advance!!

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Doubts on signal and slots

    Hi

    I am working with JAVA build of QT
    Are you using QtJambi??

    If Yes read here
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    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: Doubts on signal and slots

    Qt Code:
    1. QObject::connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(function(int, bool)));
    To copy to clipboard, switch view to plain text mode 
    Read it like this
    - makes a connection between object http and object this
    - the connection is made between http's signal requestFinished(int, bool), and this's slot function(int, bool)
    - when ever requestFinished() is emitted function() is called automatically

    Note: Both http and this should have QObject as base class, either directly or indirectly.

    Documentation

Similar Threads

  1. Signal/Slots, Where can i use it?
    By Tio in forum Newbie
    Replies: 2
    Last Post: 25th May 2010, 01:36
  2. Signal and Slots
    By waynew in forum Newbie
    Replies: 3
    Last Post: 20th November 2009, 03:50
  3. signal and slots
    By vermarajeev in forum Qt Programming
    Replies: 4
    Last Post: 16th October 2007, 08:31
  4. doubts in signal and slots
    By sar_van81 in forum Qt Programming
    Replies: 7
    Last Post: 2nd April 2007, 12:31
  5. Signal and slots
    By villy in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2007, 10:10

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.