hi wysota!
It works like this:
Qt Code:
  1. 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()":
Qt Code:
  1. .
  2. .
  3. QTreeWidgetItem *root = new QTreeWidgetItem(ui.tree);
  4. root->setIcon(0, QIcon(QString::fromUtf8(":/images/images/database.jpg")));
  5. root->setText(0, "inventar");
  6. QTreeWidgetItem *tables = new QTreeWidgetItem(root);
  7. .
  8. .
To copy to clipboard, switch view to plain text mode 
Thats why i tryed:
Qt Code:
  1. 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?