Results 1 to 2 of 2

Thread: syntax signal/slots QT - question

  1. #1
    Join Date
    Sep 2016
    Posts
    78
    Thanked 1 Time in 1 Post
    Qt products
    Qt5

    Default syntax signal/slots QT - question

    I have some questions about signal and slots. First thing the syntax look like this:

    connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
    If i am not wrong:

    const QObject *sender-> is the button that start the signal?
    const char *signal, -> the signal
    const char *method->element receive the signal
    Qt::ConnectionType type-> slot
    Other question i have, i can call the signal using emit or other way without buttons? thx again!

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: syntax signal/slots QT - question

    Please read the doc for QObject::connect and the doc for signals & slots.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. Question about signal and slots
    By davinciomare in forum Newbie
    Replies: 6
    Last Post: 6th October 2016, 11:29
  2. Replies: 1
    Last Post: 28th February 2015, 16:20
  3. QPainter Constructor Syntax Question
    By deejross in forum Newbie
    Replies: 6
    Last Post: 26th January 2011, 01:16
  4. Replies: 2
    Last Post: 9th March 2010, 12:48
  5. QPaintEvent syntax question
    By last2kn0 in forum Newbie
    Replies: 5
    Last Post: 25th January 2008, 20:36

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.