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) :
sag = new QPainter;
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