now seems to work... it's strange, I added that QAction when it wasn't working and I was searching the problem; well, now I just need your help to discover why my cutomized slot does not work... :S
QHash<int, QString>::const_iterator it = m_miHashTable.constBegin();
while (it != miHashTable.constEnd())
{
QAction* action
= menu
->addAction
(nameSubmenu
);
bool pleaseWork
= QObject::connect(action,
SIGNAL(triggered
(bool)),
this,
SLOT(changeStatus
(bool)));
it++;
}
QMenu* menu = new QMenu();
QHash<int, QString>::const_iterator it = m_miHashTable.constBegin();
while (it != miHashTable.constEnd())
{
QString nameSubmenu = it.value();
QAction* action = menu->addAction(nameSubmenu );
bool pleaseWork = QObject::connect(action, SIGNAL(triggered(bool)), this, SLOT(changeStatus(bool)));
it++;
}
To copy to clipboard, switch view to plain text mode
header file (after public and private, in other projects it worked fine, and I've tried as private and public and public slots and private slots)
private slots:
void changeStatus(bool a);
private slots:
void changeStatus(bool a);
To copy to clipboard, switch view to plain text mode
void CIAguja::changeStatus(bool a)
{
}
void CIAguja::changeStatus(bool a)
{
}
To copy to clipboard, switch view to plain text mode
thanks again!
Bookmarks