I'm trying to override a base class like this in C++

```
class A:
    QWidget *getWidget();

class B: public A:
    using A::getWidget;
    QWidget *getWidget();

```

When I try to use this:

```
A *test = new B();
test->getWidget();

```

Here, the widget from class A is returned. Is there a way to get widget B? Since I don't want to start with inspecting my class and casting down to B to get the correct widget, I want to be able to use it similar to the above code snippet. Any suggestions?