Hi guys, I have a question. I'm making a widget (let's call it myWidget) which inherits from QWidget and my window widget (the top one in the parent hierarchy) is a MainWindow (made by me) which inherits from QMainWindow. The question is, why something like this doesn't work ?
The cast doesn't work, even with a dynamic_cast its the same. Why ?Qt Code:
... public: ... }; // a slot I made void myslot() { ... MainWindow* p = static_cast<MainWindow*>(window()); ... }To copy to clipboard, switch view to plain text mode
Bookmarks