I have made a QToolButton
with some actions like :
QToolButton * toolBut1 = new QToolButton(this);
actionGroup1 = new QActionGroup(this);
actionGroup1->setExclusive(true);
action1 = new QAction(QIcon(":/images/icon1"),"", actionGroup1);
action1->setCheckable(true);
action2 = new QAction(QIcon(":/images/icon2"),"", actionGroup1);
action2->setCheckable(true);
action3 = new QAction(QIcon(":/images/icon3"),"", actionGroup1);
action3->setCheckable(true);
toolBut1->addAction(action1);
toolBut1->addAction(action2);
toolBut1->addAction(action3);
But when I hover the mouse pointer on the actions, some warnings are displayed in the application output :
QGradient::setColorAt: Color position must be specified in the range 0 to 1
Why is this happening? How to fix it?
P.S. I am using Qt 4.8.4 on Windows 7.
I set different names for these actions and result was that the warning is not shown any more.