Results 1 to 8 of 8

Thread: "No such slot..."

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: "No such slot..."

    Of course i did. Several times.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: "No such slot..."

    Is decChanged() a slot or a signal? How is it declared in the class?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3

    Default Re: "No such slot..."

    Hi,

    I'm new to Qt and C++ so I'm asking questions about this problem to learn and test my knowledge. Unfortunately I don't have the "for sure" answer.

    I'm not familiar with the book you are using. Does it have you modify the ui_... .h file?

    I would try uncommenting the slot declarations in the dialog.h file, then add the slot functions to the dialog.cpp file e.g.
    Qt Code:
    1. Dialog::void decChanged (const QString &newValue)
    2. {
    3. bool ok;
    4. int num = newValue.toInt(&ok);
    5. if (ok) {
    6. hexEdit->setText(QString::number(num, 16));
    7. binEdit->setText(QString::number(num, 2));
    8. } else {
    9. hexEdit->setText("0");
    10. binEdit->setText("0");
    11. }
    12. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 5
    Last Post: 24th May 2010, 22:20
  2. debugging "signal does not reach slot" in a template class
    By Daniel Dekkers in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2010, 17:03
  3. Replies: 1
    Last Post: 5th January 2010, 14:34
  4. Replies: 1
    Last Post: 23rd August 2008, 23:09
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05

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
  •  
Qt is a trademark of The Qt Company.