I am using Qt Creator and C++ for my code. I have a checkable combobox for multiselection. I want to select the unchecked checkbox using mouse Middlebuton from popup. I tried to override the mousePressEvent but didn't work. Below is the snippet of my code:
void GCheckEditCombobox::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::MiddleButton && currentItem())
{
// doe the stuff you have to
}
else
{
QComboBox::mousePressEvent(event);
}
}