Hi.
I have a new class called Piece, tried to inherit QLabel or QPushButton, everything is good, but once I try to set a parent (QWidget *container) its says
error: "void QWidget::setParent(QWidget*)' is inaccessible
void setParent(QWidget *parent);
^."
After see that QLabel wasn't working, tried with QPushButton and happened the same thing.
My Example Class:
Qt Code:
#ifndef PIECE_H #define PIECE_H #include <QPushButton> #include <QMouseEvent> Q_OBJECT public: Piece(); }; #endif // PIECE_HTo copy to clipboard, switch view to plain text mode
Bookmarks