1. Please use code tags in the future.
2. What is the question?
3. Define "working".
4. What is it that you are trying to achieve?
5. If I understand your code correctly the use of a signal mapper is not needed.
1. Please use code tags in the future.
2. What is the question?
3. Define "working".
4. What is it that you are trying to achieve?
5. If I understand your code correctly the use of a signal mapper is not needed.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
showing the header would be useful - is void clicked(const QString &text) defined as a slot?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
No void clicked(const QString &text) is defined as a signal
Qt Code:
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QtGui/QMainWindow> #include <QtGui> #include <QGridLayout> #include <QSignalMapper> namespace Ui { class MainWindow; } { Q_OBJECT public: ~MainWindow(); signals: protected: private: Ui::MainWindow *ui; QPushButton *theButton; QGridLayout *theLayout; QSignalMapper *theMapper; }; #endif // MAINWINDOW_HTo copy to clipboard, switch view to plain text mode
Last edited by wysota; 26th November 2012 at 15:05.
Bookmarks