Just follow the steps above..Did you initialize the check state?
Qt Code:
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // default flags + checkable item->setCheckState(0, Qt::Unchecked); // you must also initialize the stateTo copy to clipboard, switch view to plain text mode
Bookmarks