Add a scroll bar to the interface of "Dictionary Manager"

Because this interface is too long, I added a scroll bar.
This commit is contained in:
sirius-fan 2019-10-17 14:54:44 +08:00 committed by GitHub
parent b3da589ac8
commit 0d4a3210a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,8 +48,13 @@ class DictManageDialog(Dialog):
self._options = list() self._options = list()
btnbox = QDialogButtonBox(QDialogButtonBox.Ok, Qt.Horizontal, self) btnbox = QDialogButtonBox(QDialogButtonBox.Ok, Qt.Horizontal, self)
btnbox.accepted.connect(self.accept) btnbox.accepted.connect(self.accept)
self.scroll = QWidget()
self.scroll.setMinimumSize(250, 1100)
# add dicts mapping # add dicts mapping
self.dicts_layout = QGridLayout() self.dicts_layout = QGridLayout(self.scroll)
self.scroll_area = QScrollArea()
self.scroll_area.setWidget(self.scroll)
self.main_layout.addWidget(self.scroll_area)
self.main_layout.addLayout(self.dicts_layout) self.main_layout.addLayout(self.dicts_layout)
self.main_layout.addWidget(btnbox) self.main_layout.addWidget(btnbox)
self.build() self.build()