mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Disable certain mouse wheel events in Options dialog
The mouse wheel events for QComboBox & QSpinBox widgets in Options dialog are filtered out.
This commit is contained in:
parent
0b050e2a30
commit
96819f3798
3 changed files with 21 additions and 21 deletions
|
@ -31,28 +31,11 @@
|
|||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QEvent>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include <QTableWidget>
|
||||
|
||||
class WheelEventEater: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
switch (event->type()) {
|
||||
case QEvent::Wheel:
|
||||
return true;
|
||||
default:
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class AdvancedSettings: public QTableWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue