Hi,

i'm getting the following error message while compiling:
Qt Code:
  1. error C2664: 'QTest::mouseClick' : cannot convert parameter 1 from 'QAction *' to 'QWidget *'
To copy to clipboard, switch view to plain text mode 

This is my coding:
Qt Code:
  1. QMenuBar* mb = pWidget->findChild<QMenuBar *>("menubar");
  2. QAction* fileAction = mb->findChild<QAction *>("File");
  3. QAction* newProject = fileAction->findChild<QAction *>("Create New Project...");
  4. QTest::mouseClick( newProject, Qt::LeftButton );
To copy to clipboard, switch view to plain text mode 

Two questions:
1) I know that mouseClick expects a QWidget, but in the tutorial the use e.g. QLineEdit so i think this should work with QAction, too?!
2) Is there another possibility to get the children of an object? I think it's weird to get the children from a top-object this way..

kind regards