p_tree_widget->setColumnCount(1);
p_folder->setText(0, tr("Content"));
p_folder
->setIcon
(0,
QIcon(":/images/closed_folder.png"));
p_data->setText(0, tr("data"));
p_data
->setIcon
(0,
QIcon(":/images/data.png"));
{
// get QTreeWidgetItem
p_collapsed
->setIcon
(0,
QIcon(":/images/closed_folder.png"));
};
{
// get QTreeWidgetItem
p_collapsed
->setIcon
(0,
QIcon(":/images/open_folder.png"));
};
p_tree_widget->setColumnCount(1);
connect(p_tree_widget, SIGNAL(collapsed(QModelIndex &)), this, SLOT(collapsed(QModelIndex &)));
connect(p_tree_widget, SIGNAL(expanded (QModelIndex &)), this, SLOT(expanded (QModelIndex &)));
QTreeWidgetItem *p_folder = new QTreeWidgetItem(project_tree);
p_folder->setText(0, tr("Content"));
p_folder->setIcon(0, QIcon(":/images/closed_folder.png"));
QTreeWidgetItem *p_data = new QTreeWidgetItem(project_tree);
p_data->setText(0, tr("data"));
p_data->setIcon(0, QIcon(":/images/data.png"));
void collapsed ( const QModelIndex &index )
{
// get QTreeWidgetItem
p_collapsed->setIcon(0, QIcon(":/images/closed_folder.png"));
};
void expanded ( const QModelIndex &index )
{
// get QTreeWidgetItem
p_collapsed->setIcon(0, QIcon(":/images/open_folder.png"));
};
To copy to clipboard, switch view to plain text mode
Bookmarks