Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

QObject and QWidget classes, request for memeber is ambiguous

$
0
0
I have an abstract class that inherits QObject so it can use signals and slots. Then I have a derived class from it that also inherits QWidget. The abstract class is not meant to have any GUI so I cannot inherit QWidget in the abstract class and not inherit it after in the derived class… class other; class abstractClass : protected other, public QObject; class derivedClass : public abstractClass, public QWidget; In the derived class constructor, when i call this->setParent() or other methods available in both QObject and QWidget classes I get a compiler error saying that the call is ambiguous. If I remove QObject inheritance from the abstract class I am unable to use slots and signals (more errors during compilation). Changing inheritance from public to private or protected does not have any effect on any of the classes… How can I escape this madness?

Viewing all articles
Browse latest Browse all 13965

Trending Articles