Qt: Set tooltip on ByteViewTab

Set the tab name as tooltip on ByteViewTab.  This is useful when
having many tabs on a small screen.

Change-Id: Idb375f0b7d510ecb9b42cfccc6ebc4dd798f463b
Reviewed-on: https://code.wireshark.org/review/22549
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Stig Bjørlykke 2017-07-07 19:24:41 +02:00 committed by Michael Mann
parent a7a66a1890
commit 7bacf534d8
1 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,8 @@ void ByteViewTab::addTab(const char *name, tvbuff_t *tvb, proto_tree *tree, QTre
byte_view_text->setMonospaceFont(mono_font_);
connect(this, SIGNAL(monospaceFontChanged(QFont)), byte_view_text, SLOT(setMonospaceFont(QFont)));
connect(byte_view_text, SIGNAL(byteFieldHovered(const QString&)), this, SIGNAL(byteFieldHovered(const QString&)));
QTabWidget::addTab(byte_view_text, name);
int idx = QTabWidget::addTab(byte_view_text, name);
QTabWidget::setTabToolTip(idx, name);
}
void ByteViewTab::clear()