Merge pull request #176 from sirius-fan/patch-1

Add a scroll bar to the interface of "Dictionary Manager"
This commit is contained in:
sthoo 2019-12-08 23:30:05 +08:00 committed by GitHub
commit 8029371a4c
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()