Results 1 to 2 of 2

Thread: a simple noob question

  1. #1
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default a simple noob question

    Hi i'm reading the book "C++ GUI Programiming with Qt4",and i found this code on chapter 2,my question is what the "emit" keyword does in the code,what is it for?


    Qt Code:
    1. void FindDialog::findClicked()
    2. {
    3. QString text = lineEdit->text();
    4. Qt::CaseSensitivity cs = caseCheckBox->isChecked() ? Qt::CaseSensitive
    5. : Qt::CaseInsensitive;
    6.  
    7. if (backwardCheckBox->isChecked())
    8. {
    9. emit findPrevious(text, cs);
    10. } else {
    11. emit findNext(text, cs);
    12. }
    13. }
    14.  
    15. void FindDialog::enableFindButton(const QString &text)
    16. {
    17. findButton->setEnabled(!text.isEmpty());
    18. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jacek; 2nd July 2008 at 02:59. Reason: changed [quote] to [code]

  2. #2
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: a simple noob question

    It sends out the "signal" which follows it.

Similar Threads

  1. QTextEdit simple question
    By Marcopolo in forum Qt Tools
    Replies: 4
    Last Post: 11th October 2007, 00:01
  2. simple thread layout question
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 12th August 2006, 11:02
  3. Simple Question on getExistingDirectory
    By Naveen in forum Qt Programming
    Replies: 6
    Last Post: 3rd March 2006, 09:44
  4. simple question on Class-Members
    By mickey in forum General Programming
    Replies: 7
    Last Post: 4th February 2006, 22:37
  5. QTextEdit Qt4: simple question
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2006, 12:03

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.