From: Damjan Rems Date: 2012-09-01T17:30:41+09:00 Subject: Re: Qt signals driving me crazy Stefano was right. It works now. I must have lost my nerves somewhere in beetween ;-( The problem is that all three declarations must be the same: slots 'nitem_clicked(QTreeWidgetItem*, int)' connect(self, SIGNAL('itemActivated( QTreeWidgetItem*, int )'), self, SLOT('nitem_clicked(QTreeWidgetItem*, int)')) Thanks guys. ---------------------- Now I have another problem. You can add text and icons to Qt::TreeWidgetItem. item = Qt::TreeWidgetItem.new item.setText(0,'Test') item.setIcon(0, Qt::Icon.new('pics/test.png') ) But I would like to add an object. There is a method QTreeWidgetItem::setData ( int column, int role, const QVariant & value ) If I use item.setData(0, Qt::UserRole, some_object) I get method_missing': undefined method `setData ... which usually means that one of data type is not valid. Is there another way to add object pointer to QTreeWidgetItem. by TheR -- Posted via http://www.ruby-forum.com/.