[Qt-interest] What widget was clicked?
Keiver Hdez Fdez
khfernandez at uci.cu
Thu Apr 22 20:55:12 CEST 2010
Hello folks, I have some widget added dynamically, like this:
QWidget * uno = new QWidget(parent);
uno->setStyleSheet("background: yellow");
QWidget * dos = new QWidget(parent);
dos->setStyleSheet("background: blue");
QWidget * tres = new QWidget(parent);
tres->setStyleSheet("background: white");
ui->horizontalLayout->addWidget(uno);
ui->horizontalLayout->addWidget(dos);
ui->horizontalLayout->addWidget(tres);
How do I know what was the widget the user clicked? Take a look at the picture.
Thanks in advance.
Saludos,
Ing. Keiver Hdez Fdez.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100422/c97d1cd6/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: widget_clicked.png
Type: image/png
Size: 6635 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100422/c97d1cd6/attachment.png
More information about the Qt-interest-old
mailing list