The cast to MyWidget is successful because qobject_cast() makes no distinction between built-in Qt types and custom types. QLabel *label = qobject_cast<QLabel *> ...
確定! 回上一頁