The next line of code is setting the event handler:
QObject::connect(ui->treeWidget, SIGNAL(clicked(QModelIndex)) (QModelIndex)), this, SLOT(tree_widget_item_selected(QModelIndex))); In the tree_widget_item_selected slot, tree_widget_item_selected 'm trying to do the following thing:
selected = selected.parent(); At debug of the given line I receive Segmentation fault . With that, if you do not debug, but simply use the program as intended, everything works as expected.
Win7, Qt 5.1.
What could be the problem?