it was the problem in order to call the function :
Code:
class Example: public QWidget
(
Q_OBJECT
QPushButton * bt_m;
QVector <QLineEdit *> le_m;
public:
Example ()
(
bt_m = new QPushButton ( "Click", this);
le_m. push_back (new QLineEdit (this));
connect (le_m. back (), SIGNAL (triggered ()), this, SLOT (doSomething ()));
le_m. push_back (new QLineEdit (this));
connect (le_m. back (), SIGNAL (triggered ()), this, SLOT (doSomething ()));
)
private slots:
void doSomething ()
(
le_m [0] -> setText ( "hi");
le_m [1] -> setText ( "hello");
)
);
Bookmarks