If a QTreeWidget has checkable elements in any column, one needs to explicitly click on the checkbox to change the check state. More...
#include <pqTreeWidgetCheckHelper.h>
Inherits QObject.
Public Types | |
enum | CheckMode { CLICK_IN_COLUMN, CLICK_IN_ROW } |
Public Member Functions | |
pqTreeWidgetCheckHelper (QTreeWidget *treeWidget, int checkableColumn, QObject *parent) | |
void | setCheckMode (CheckMode mode) |
CheckMode | checkMode () const |
Protected Slots | |
void | onItemClicked (QTreeWidgetItem *item, int column) |
void | onItemPressed (QTreeWidgetItem *item, int column) |
If a QTreeWidget has checkable elements in any column, one needs to explicitly click on the checkbox to change the check state.
However, sometimes we simply want the checkbox to be updated when the user clicks on the entire row. For that purpose, we use pqTreeWidgetCheckHelper. Simply create and instance of pqTreeWidgetCheckHelper, and set a tree to use.
Definition at line 22 of file pqTreeWidgetCheckHelper.h.
Enumerator | |
---|---|
CLICK_IN_COLUMN | |
CLICK_IN_ROW |
Definition at line 31 of file pqTreeWidgetCheckHelper.h.
pqTreeWidgetCheckHelper::pqTreeWidgetCheckHelper | ( | QTreeWidget * | treeWidget, |
int | checkableColumn, | ||
QObject * | parent | ||
) |
|
inline |
Definition at line 41 of file pqTreeWidgetCheckHelper.h.
|
inline |
Definition at line 42 of file pqTreeWidgetCheckHelper.h.
|
protectedslot |
|
protectedslot |