mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Show player slots in the overview.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""A layout containing a widget with an associated label."""
|
||||
from typing import Optional
|
||||
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import QHBoxLayout, QLabel, QWidget
|
||||
|
||||
@@ -10,8 +12,13 @@ class QLabeledWidget(QHBoxLayout):
|
||||
label is used to name the input.
|
||||
"""
|
||||
|
||||
def __init__(self, text: str, widget: QWidget) -> None:
|
||||
def __init__(self, text: str, widget: QWidget,
|
||||
tooltip: Optional[str]) -> None:
|
||||
super().__init__()
|
||||
self.addWidget(QLabel(text))
|
||||
label = QLabel(text)
|
||||
self.addWidget(label)
|
||||
self.addStretch()
|
||||
self.addWidget(widget, alignment=Qt.AlignRight)
|
||||
if tooltip is not None:
|
||||
label.setToolTip(tooltip)
|
||||
widget.setToolTip(tooltip)
|
||||
|
||||
Reference in New Issue
Block a user