Hi there,

I've got a Problem. Sorry for my bad english, that the reason why I want to show you my code. This tells more than my 1000 words...
1st my Class,
Qt Code:
  1. using namespace MyNamespace;
  2. class MyTreeWidgetItem : public QTreeWidgetItem
  3. {
  4. Q_OBJECT
  5.  
  6. public:
  7. SingleScanTreeWidgetItem(QTreeWidget *parent);
  8. ~SingleScanTreeWidgetItem();
  9.  
  10. void makeActions(QMenu* menu);
  11.  
  12. public slots:
  13. void onAction();
  14. };
To copy to clipboard, switch view to plain text mode 

Okay, and here is my implementation:
Qt Code:
  1. MyTreeWidgetItem::MyTreeWidgetItem(QTreeWidget *parent)
  2. : QTreeWidgetItem(parent)
  3. {
  4. setText(0,"The Text");
  5. }
  6.  
  7. MyTreeWidgetItem::~MyTreeWidgetItem()
  8. {
  9. }
  10.  
  11. void MyTreeWidgetItem::makeActions(QMenu* menu)
  12. {
  13. QAction* action = new QAction(QString("Test"),menu);
  14. menu->addAction(action);
  15.  
  16. QObject::connect(action,SIGNAL(triggered()),this,SLOT(onAction()));
  17. }
  18.  
  19. void MyTreeWidgetItem::onAction()
  20. {
  21. int test(0);
  22. }
To copy to clipboard, switch view to plain text mode 

So, thats all. But my compiler gives my an error:
CompileError C2665:
'function' : none of the number1 overloads can convert parameter number2 from type 'type'
So whats my mistake? How can I solve this problem?
Did anybody knows that?

Ciao + Thanks