33 from python_qt_binding.QtCore
import Qt
34 from python_qt_binding.QtGui
import QColor
35 from python_qt_binding.QtWidgets
import QDialog, QDialogButtonBox, QGroupBox, QHBoxLayout, QListWidget, QListWidgetItem, QPushButton, QVBoxLayout, QWidget
41 super(ListDialog, self).
__init__(parent)
48 self.
_button_box = QDialogButtonBox(QDialogButtonBox.Save | QDialogButtonBox.Close)
52 self.setWindowTitle(title)
67 w_item = QListWidgetItem()
68 w_item.setText(item[0])
69 w_item.setFlags(w_item.flags() | Qt.ItemIsUserCheckable)
70 w_item.setCheckState(Qt.Checked
if item[1]
else Qt.Unchecked)
76 if item.checkState() == Qt.Checked:
77 item.setBackground(QColor(
"#ffffb2"))
79 item.setBackground(QColor(
"#ffffff"))
85 if item.checkState() == Qt.Checked:
91 error_code = super(ListDialog, self).
exec_()
def highlight_checked(item)
def create_list_widget(self, items)
def __init__(self, title, items, parent)