Python qtpy.QtWidgets.QListWidget() Examples
The following are 4
code examples of qtpy.QtWidgets.QListWidget().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
qtpy.QtWidgets
, or try the search function
.
Example #1
Source File: pop_in_dialog.py From cutelog with MIT License | 5 votes |
def setupUi(self): self.resize(200, 320) self.vbox = QVBoxLayout(self) self.listWidget = QListWidget(self) self.listWidget.setSelectionMode(self.listWidget.MultiSelection) self.listWidget.selectionModel().reset() self.vbox.addWidget(self.listWidget) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel, self) self.vbox.addWidget(self.buttonBox) self.buttonBox.accepted.connect(self.accept) self.listWidget.doubleClicked.connect(self.accept) self.buttonBox.rejected.connect(self.reject) self.fill_logger_list()
Example #2
Source File: wvtkutils.py From pyCGNS with GNU Lesser General Public License v2.1 | 5 votes |
def __init__(self, arg): QComboBox.__init__(self, arg) self.actorlist = QListWidget() self.setModel(self.actorlist.model()) self.setView(self.actorlist) self.view().installEventFilter(self) self.parent = None
Example #3
Source File: attribute_widgets.py From pyrpl with GNU General Public License v3.0 | 5 votes |
def _make_widget(self): """ Sets up the widget (here a QComboBox) :return: """ self.widget = QtWidgets.QListWidget() self.widget.addItems(self.options) self.widget.currentItemChanged.connect(self.write_widget_value_to_attribute)
Example #4
Source File: targets_ui.py From Pyslvs-UI with GNU Affero General Public License v3.0 | 4 votes |
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(346, 309) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout_4 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_4.setObjectName("verticalLayout_4") self.main_label = QtWidgets.QLabel(Dialog) self.main_label.setObjectName("main_label") self.verticalLayout_4.addWidget(self.main_label) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.other_label = QtWidgets.QLabel(Dialog) self.other_label.setObjectName("other_label") self.verticalLayout_3.addWidget(self.other_label) self.other_list = QtWidgets.QListWidget(Dialog) self.other_list.setObjectName("other_list") self.verticalLayout_3.addWidget(self.other_list) self.horizontalLayout.addLayout(self.verticalLayout_3) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.targets_add = QtWidgets.QPushButton(Dialog) self.targets_add.setMaximumSize(QtCore.QSize(30, 16777215)) self.targets_add.setObjectName("targets_add") self.verticalLayout.addWidget(self.targets_add) self.other_add = QtWidgets.QPushButton(Dialog) self.other_add.setMaximumSize(QtCore.QSize(30, 16777215)) self.other_add.setObjectName("other_add") self.verticalLayout.addWidget(self.other_add) self.horizontalLayout.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.targets_label = QtWidgets.QLabel(Dialog) self.targets_label.setObjectName("targets_label") self.verticalLayout_2.addWidget(self.targets_label) self.targets_list = QtWidgets.QListWidget(Dialog) self.targets_list.setObjectName("targets_list") self.verticalLayout_2.addWidget(self.targets_list) self.horizontalLayout.addLayout(self.verticalLayout_2) self.verticalLayout_4.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) self.button_box = QtWidgets.QDialogButtonBox(Dialog) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.button_box.setObjectName("button_box") self.horizontalLayout_2.addWidget(self.button_box) self.verticalLayout_4.addLayout(self.horizontalLayout_2) self.retranslateUi(Dialog) self.button_box.accepted.connect(Dialog.accept) self.button_box.rejected.connect(Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)