Skip to content

Commit

Permalink
Add tooltips based on descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
teekuningas committed Mar 15, 2024
1 parent 084eb4a commit de79f5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meggie/mainwindow/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,13 @@ def __init__(self, parent):

action_spec = self.action_specs[action_name][2]
title = action_spec["name"]
description = action_spec.get("description", "")

pushButtonInputActionElement = QtWidgets.QPushButton(
self.groupBoxInputActions
)
pushButtonInputActionElement.setText(title)
pushButtonInputActionElement.setToolTip(description)
self.gridLayoutInputActions.addWidget(
pushButtonInputActionElement, idx, 0, 1, 1
)
Expand All @@ -310,11 +312,13 @@ def __init__(self, parent):

action_spec = self.action_specs[action_name][2]
title = action_spec["name"]
description = action_spec.get("description", "")

pushButtonOutputActionElement = QtWidgets.QPushButton(
self.groupBoxOutputActions
)
pushButtonOutputActionElement.setText(title)
pushButtonOutputActionElement.setToolTip(description)
self.gridLayoutOutputActions.addWidget(
pushButtonOutputActionElement, idx, 0, 1, 1
)
Expand Down

0 comments on commit de79f5e

Please sign in to comment.