QPainter
-
Hi,
I'm a starter Qt programmer and try to use QPainter,
I can't show the item that QPainter has draw in my mainwindow.here is my simple code in mainwindow.cpp that not show any things:
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
sag = new QPainter;
sag->drawEllipse(500,500,500,500);}
what is wrong?!
-
Hi and welcome to devnet,
You're using it wrongly.
You should have a look at the "QPainter's documentation and examples":http://qt-project.org/doc/qt-4.8/qpainter.html to see how to use it