]>
jfr.im git - irc/weechat/qweechat.git/blob - qweechat/about.py
1 # -*- coding: utf-8 -*-
3 # about.py - about dialog box
5 # Copyright (C) 2011-2021 Sébastien Helleu <flashcode@flashtux.org>
7 # This file is part of QWeeChat, a Qt remote GUI for WeeChat.
9 # QWeeChat is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # QWeeChat is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with QWeeChat. If not, see <http://www.gnu.org/licenses/>.
23 from PySide6
import QtCore
, QtWidgets
as QtGui
26 class AboutDialog(QtGui
.QDialog
):
29 def __init__(self
, name
, messages
, *args
):
30 QtGui
.QDialog
.__init
__(*(self
,) + args
)
32 self
.setWindowTitle(name
)
34 close_button
= QtGui
.QPushButton('Close')
35 close_button
.pressed
.connect(self
.close
)
37 hbox
= QtGui
.QHBoxLayout()
39 hbox
.addWidget(close_button
)
42 vbox
= QtGui
.QVBoxLayout()
44 label
= QtGui
.QLabel(msg
)
45 label
.setAlignment(QtCore
.Qt
.AlignHCenter
)