I am new to Qt programming. What I want to do is pretty much self explanatory from the title I guess. I have a lineEdit whose data I want to store in a QString when a cretain PushButton is clicked. The problem is the above widgets are inside a graphicsScene so i dont have a on_pushbutton_clicked(); function.
The code for my own solution is below, but as you might have guessed, its not working.
QLineEdit *l = new QLineEdit ;
QPushButton *b = new QPushButton;
QGraphicsProxyWidget *line = scene.addWidget(l);
QGraphicsProxyWidget *button = scene.addWidget(b);
line->setPos(-600,270);
button->setPos(-600,310);
//b->clicked();
QString input;
QString input = l->text(input);
QObject::connect(b,SIGNAL (clicked()),l, SLOT (setText(QString)));
Any kind of help will be greatly appreciated.