bool GraphPage::eventFilter(QObject *target, QEvent *event){ if (target == graphDraw || target == button0 || target == button1 || target == button2 || target == button3) { if(event->type() == QEvent::Wheel) { if(myCombobox->isEnabled()) { .... вот тут , я так понимаю, надо что написать для отправки события на QComboBox myCombobox } } } return QWidget::eventFilter(target, event);}
bool GraphPage::eventFilter(QObject *target, QEvent *event){ if (target == graphDraw || target == button0 || target == button1 || target == button2 || target == button3) { if(event->type() == QEvent::Wheel) { if(myCombobox->hasFocus()) { qApp->sendEvent(myCombobox, event); } } }return QWidget::eventFilter(target, event);}
graphDraw->installEventFilter(this);button0->installEventFilter(this);button1->installEventFilter(this);button2->installEventFilter(this);button3->installEventFilter(this);
if (qobject_cast<QWidget *>(target)->parentWidget() == myCombobox->parentWidget()){ if(event->type() == QEvent::Wheel) ....}
C++ (Qt)QWidget *targetWidget = qobject_cast<QWidget *>(target);if (targetWidget && targetWidget->parentWidget() == myCombobox->parentWidget())...