I'm using Qt 4.6.3 SDK on the 64 bit version Fedora 13. I created a project via Creator & the form via Designer. It's a trivial program intended only to experiment with Signals & Slots to get me started with Qt. I've read everything I can find & I've done just what the docs say is right, but it doesn't work. I'm including the code from the header & cpp as well as the output from the build. Any help in understanding why this isn't working will be greatly appreciated.

Note: The app does run & the initial string is displayed.

Thanx,

Ed
This is the header:
Qt Code:
  1. #ifndef SANDSDEMO_H
  2. #define SANDSDEMO_H
  3.  
  4. #include <QWidget>
  5. #include <QObject>
  6. #include <QLabel>
  7.  
  8. namespace Ui {
  9. class SandSDemo;
  10. }
  11.  
  12. class SandSDemo : public QWidget
  13. {
  14. Q_OBJECT
  15.  
  16. public:
  17. explicit SandSDemo(QWidget *parent = 0);
  18. ~SandSDemo();
  19.  
  20. public slots:
  21. void cancelText();
  22.  
  23. private:
  24. Ui::SandSDemo *ui;
  25. void initialText();
  26. };
  27.  
  28. #endif // SANDSDEMO_H
To copy to clipboard, switch view to plain text mode 

This is the source:
Qt Code:
  1. #include "sandsdemo.h"
  2. #include "ui_sandsdemo.h"
  3.  
  4. SandSDemo::SandSDemo(QWidget *parent) :
  5. QWidget(parent),
  6. ui(new Ui::SandSDemo)
  7. {
  8. ui->setupUi(this);
  9. connect(ui->cancelButton,SIGNAL(clicked()),ui->msgArea,SLOT(cancelText()));
  10. initialText();
  11. }
  12.  
  13. SandSDemo::~SandSDemo()
  14. {
  15. delete ui;
  16. }
  17.  
  18. void SandSDemo::initialText()
  19. {
  20. QString * initialMsg = new QString( "This is the string that will be displayed upon initialization.");
  21.  
  22. ui->msgArea->setText(*initialMsg);
  23. delete initialMsg;
  24. }
  25.  
  26. void SandSDemo::cancelText()
  27. {
  28. QString * cancelMsg = new QString("This is the string that will be displayed when the cancel button is clicked.");
  29. ui->msgArea->setText(*cancelMsg);
  30. delete cancelMsg;
  31. }
To copy to clipboard, switch view to plain text mode 

This is the error from the build output:

Starting /home/ed/projects/SandSDemo-build-desktop/SandSDemo...
Object::connect: No such slot QLabel::cancelText() in ../SandSDemo/sandsdemo.cpp:9
Object::connect: (sender name: 'cancelButton')
Object::connect: (receiver name: 'msgArea')
/home/ed/projects/SandSDemo-build-desktop/SandSDemo exited with code 0