From 7f970cebb3838fe2b516779d5356c97274812238 Mon Sep 17 00:00:00 2001 From: Tim Henning Date: Tue, 11 Jun 2019 15:20:32 +0200 Subject: [PATCH] Tracing: Add tooltip to category labels in analyzer timelines This is especially useful for longer names that often get elided in the Perf Profiler and the new Chrome Trace Format Visualizer. It uses a dummy button to show the same tooltip style as the buttons while not having to import QtQuick.Controls.Private. Change-Id: I5580a9ecc1acb69b0faec00a2f35952df0e1ce92 Reviewed-by: Ulf Hermann --- src/libs/tracing/qml/CategoryLabel.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libs/tracing/qml/CategoryLabel.qml b/src/libs/tracing/qml/CategoryLabel.qml index 5945b0f6dfa..48e82f5b939 100644 --- a/src/libs/tracing/qml/CategoryLabel.qml +++ b/src/libs/tracing/qml/CategoryLabel.qml @@ -54,6 +54,15 @@ Item { property bool reverseSelect: false + Button { + // dummy button to display a tooltip + anchors.fill: parent + tooltip: labelContainer.text + style: ButtonStyle { + background: Item {} + } + } + MouseArea { id: dragArea anchors.fill: txt