Skip to content

Commit 054222a

Browse files
committed
Add system_info option
1 parent 9268803 commit 054222a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

qtapputils/widgets/about.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(self, icon: QIcon, title: str,
2727
appname: str,
2828
website_url: str,
2929
banner_fpath: str,
30+
system_info: str = None,
3031
license_fpath: str = None,
3132
parent: QWidget = None,
3233
):
@@ -42,7 +43,7 @@ def __init__(self, icon: QIcon, title: str,
4243
font_family = font.family()
4344
font_size = font.pointSize()
4445

45-
self.label = QLabel((
46+
text = (
4647
"""
4748
<div style='font-family: "{font_family}";
4849
font-size: {font_size}pt;
@@ -54,16 +55,18 @@ def __init__(self, icon: QIcon, title: str,
5455
<a href="{website_url}">{website_url}</a>
5556
</p>
5657
<p>{longdesc}</p>
57-
</div>
5858
""".format(
5959
appname=appname,
6060
website_url=website_url,
6161
font_family=font_family,
6262
font_size=font_size,
6363
copyright_holder=copyright_holder,
64-
longdesc=longdesc
65-
)
66-
))
64+
longdesc=longdesc)
65+
)
66+
if system_info is not None:
67+
text += "<p>" + system_info + "</p>"
68+
text += "</div>"
69+
6770
self.label.setWordWrap(True)
6871
self.label.setAlignment(Qt.AlignTop)
6972
self.label.setOpenExternalLinks(True)

0 commit comments

Comments
 (0)