Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Many Buttons but same process
At my project there are many QPushButton object at one page, I want to assign a ID to all push buttons and collect all slots at the same slot. But I have to realise which button is pressed on the slot function is there an easy way to achive it or should I have to write a fuction call to all buttons?
You're likely looking for QSignalMapper
Yes @SGaist that's what I'm looking for.. thanks..
But seems that I have to write a new widget for this and I'll lose the comfort of QDesigner :(..
No you don't, you only have to add some C++ code in your current widget to use that class.
I'll look at other samples to understand.. thank you..
Who want's to use QSignalMapper with Qdesigner can add this code to initial of the class...
TheMapper = new QSignalMapper(this);
connect(TheMapper,SIGNAL(mapped(int)) , this,SLOT(GetCompProperties(int)));
//ui->vlfAlt_Cikis is a QPushButton...
thanks @SGaist ...