[Qt-interest] Multiple Button Problem
Ankit Agarwal
ankit17.ag at gmail.com
Thu Aug 25 09:19:48 CEST 2011
Hi,
I am using Qt4.2.2 on Linux, Fedora14
I have a QWidget which has 15 buttons. Each button has a different text on
it. My requirement is that, whenever a user clicks on a button, I need to
popup an QMessageBox and show that text in the message box.
Secondly, I have QList with 15 quint32 counter items. Each item in the list
corresponds to each button in the QWidget. So, whenever a user click on one
of the button, the corresponding counter item in the list should be
incremented by 1.
One way is to write 15 different connect statements, one for each button.
But, I believe there should be a better way of doing the same thing.
Please suggest how can I achieve this.
--
Regards,
Ankit Agarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110825/1aa5debc/attachment.html
More information about the Qt-interest-old
mailing list