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 <ulf.hermann@qt.io>
This commit is contained in:
Tim Henning
2019-06-11 15:20:32 +02:00
parent 61e087fe8a
commit 7f970cebb3

View File

@@ -54,6 +54,15 @@ Item {
property bool reverseSelect: false property bool reverseSelect: false
Button {
// dummy button to display a tooltip
anchors.fill: parent
tooltip: labelContainer.text
style: ButtonStyle {
background: Item {}
}
}
MouseArea { MouseArea {
id: dragArea id: dragArea
anchors.fill: txt anchors.fill: txt