Hi
i had connected about 15 QActions to a common SLOT, but i am not able to find in my slot function from which QAction the SIGNAL is coming . I had coded something like this
for(int i=0; i<15; i++)
{
play_add_Act
[i
] = new QAction(this);
play_add_Act[i]->setText("Play list");
connect(play_add_Act[i], SIGNAL(triggered()), this, SLOT(addplaylist()));
}
for(int i=0; i<15; i++)
{
play_add_Act[i] = new QAction(this);
play_add_Act[i]->setText("Play list");
connect(play_add_Act[i], SIGNAL(triggered()), this, SLOT(addplaylist()));
}
To copy to clipboard, switch view to plain text mode
i also tried to pass index variable in slot function, but Wysota said that we shouldn't pass parameters names or values in SIGNAL or SLOT macros
so how can i identify signal sender action??????
Bookmarks