hi wysota!
It works like this:
connect(ui.
tree,
SIGNAL(itemClicked
(QTreeWidgetItem*,
int)),
this,
SLOT(selectTable
()))
connect(ui.tree, SIGNAL(itemClicked (QTreeWidgetItem*,int)), this, SLOT(selectTable()))
To copy to clipboard, switch view to plain text mode
But i would like to call "selectTable()" just if i click a item of tables (not root and tables it self, but all items of tables should be able to call my function "selectTable()":
.
.
root
->setIcon
(0,
QIcon(QString::fromUtf8(":/images/images/database.jpg")));
root->setText(0, "inventar");
.
.
.
.
QTreeWidgetItem *root = new QTreeWidgetItem(ui.tree);
root->setIcon(0, QIcon(QString::fromUtf8(":/images/images/database.jpg")));
root->setText(0, "inventar");
QTreeWidgetItem *tables = new QTreeWidgetItem(root);
.
.
To copy to clipboard, switch view to plain text mode
Thats why i tryed:
connect(ui.tree, SIGNAL(itemClicked (tables,0)), this, SLOT(selectTable()))
connect(ui.tree, SIGNAL(itemClicked (tables,0)), this, SLOT(selectTable()))
To copy to clipboard, switch view to plain text mode
Is that complex to implement?
Bookmarks