I'm trying to get QGraphicsView and QGraphicsScene work (in one file), but it doesnt. Dont laugh, im beginner
#include <QApplication>
#include <QFont>
#include <QPushButton>
#include <QWidget>
#include <QGraphicsView>
Q_OBJECT;
public:
};
}
int main(int argc, char *argv[])
{
graphics Graphics;
Graphics.show();
return app.exec();
}
#include <QApplication>
#include <QFont>
#include <QPushButton>
#include <QWidget>
#include <QGraphicsView>
class graphics : QGraphicsScene {
Q_OBJECT;
public:
graphics(QWidget* parent = 0);
};
graphics::graphics(QWidget * parent) : QGraphicsScene {
QGraphicsView view(this);
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
graphics Graphics;
Graphics.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Oh and if you have a tutorial it would be great.. I googled for 15 min.
Added after 11 minutes:
Np fixed it!!
Bookmarks