He meant that you can't do this:
void Button::apasat()
{
MyWidget::verifica(y,x);
}
void Button::apasat()
{
MyWidget::verifica(y,x);
}
To copy to clipboard, switch view to plain text mode
You need to create an object of type MyWidget, something like this:
MyWidget obj; //create an instance of MyWidget class
obj.verifica(); // run the member function;
MyWidget obj; //create an instance of MyWidget class
obj.verifica(); // run the member function;
To copy to clipboard, switch view to plain text mode
An if MyWidget is an GUI widget you might want to allocate memory on the heap for objects, like this:
MyWidget *ptr = new MyWidget(parent); //alocate with "new" and give a parent
ptr->verifica(); // call member function with pointer
MyWidget *ptr = new MyWidget(parent); //alocate with "new" and give a parent
ptr->verifica(); // call member function with pointer
To copy to clipboard, switch view to plain text mode
If you don't understand take at least a tutorial of c++ first, and than a Qt one (or Qt examples), but i strongly recommend a book.
Bookmarks