mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix #142
This commit is contained in:
parent
d8e994e8f8
commit
88cc57f4bc
|
@ -188,6 +188,8 @@ Widget::Widget(QWidget *parent) :
|
|||
ui->pbClose->setMouseTracking(true);
|
||||
ui->statusHead->setMouseTracking(true);
|
||||
|
||||
ui->friendList->viewport()->installEventFilter(this);
|
||||
|
||||
QList<int> currentSizes = ui->centralWidget->sizes();
|
||||
currentSizes[0] = 225;
|
||||
ui->centralWidget->setSizes(currentSizes);
|
||||
|
@ -1199,3 +1201,17 @@ void Widget::setStatusBusy()
|
|||
{
|
||||
core->setStatus(Status::Busy);
|
||||
}
|
||||
|
||||
bool Widget::eventFilter(QObject *, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::Wheel)
|
||||
{
|
||||
QWheelEvent * whlEvnt = static_cast< QWheelEvent * >( event );
|
||||
if (whlEvnt->angleDelta().x() != 0)
|
||||
{
|
||||
event->accept();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ private:
|
|||
SelfCamView* camview;
|
||||
Camera* camera;
|
||||
bool notify(QObject *receiver, QEvent *event);
|
||||
bool eventFilter(QObject *, QEvent *event);
|
||||
};
|
||||
|
||||
#endif // WIDGET_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user