Please help with actual C++ code
Unsolved
C++ Gurus
-
This post is deleted!
-
@AnneRanch said in Please help with actual C++ code:
subMenu[index]->addAction(list_array[index][ 2] + " #" + QString::number( index_sub));
...returns a
QAction *
. You need to store this pointer to connect to the action'striggered
signal. Then you can skip the whole acrobatics about gettingindex
inside a slot.Do you understand that?
-
@AnneRanch
but I am unable to add "check box" to any of them
QAction *action = submenu[index]->addAction("Some text"); action->setCheckable(true);
adds an action with text
Some text
and sets it to have a checkbox. -
This post is deleted!
-
This post is deleted!
-
A Axel Spoerl referenced this topic on