mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
commit
091e749be3
|
@ -104,6 +104,8 @@ void WebSearchBar::focusInEvent(QFocusEvent* e)
|
|||
|
||||
if (text() == search) {
|
||||
clear();
|
||||
} else {
|
||||
selectAll();
|
||||
}
|
||||
QLineEdit::focusInEvent(e);
|
||||
}
|
||||
|
|
|
@ -230,3 +230,17 @@ void TabBar::mouseDoubleClickEvent(QMouseEvent* event)
|
|||
}
|
||||
QTabBar::mouseDoubleClickEvent(event);
|
||||
}
|
||||
|
||||
void TabBar::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
TabWidget* tabWidget = qobject_cast<TabWidget*>(parentWidget());
|
||||
if (!tabWidget)
|
||||
return;
|
||||
|
||||
int id = tabAt(event->pos());
|
||||
if (id != -1 && event->buttons() == Qt::MiddleButton) {
|
||||
tabWidget->closeTab(id);
|
||||
return;
|
||||
}
|
||||
QTabBar::mousePressEvent(event);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ private slots:
|
|||
|
||||
private:
|
||||
void mouseDoubleClickEvent(QMouseEvent* event);
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
QSize tabSizeHint(int index) const;
|
||||
// void tabInserted(int index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user