mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Handle checkbox toggle
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
enum UserDataTypes {
|
||||
TITLE = 257, // QString
|
||||
DESCRIPTION = 258, // QString
|
||||
INSTALLED = 260 // bool
|
||||
INSTALLED = 259 // bool
|
||||
};
|
||||
|
||||
/** This is an item delegate composed of:
|
||||
@ -21,4 +21,12 @@ class ProjectItemDelegate final : public QStyledItemDelegate {
|
||||
ProjectItemDelegate(QWidget* parent);
|
||||
|
||||
void paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const override;
|
||||
|
||||
bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override;
|
||||
|
||||
signals:
|
||||
void checkboxClicked(const QModelIndex& index);
|
||||
|
||||
private:
|
||||
QStyleOptionViewItem makeCheckboxStyleOption(const QStyleOptionViewItem& opt, const QStyle* style) const;
|
||||
};
|
||||
|
Reference in New Issue
Block a user