Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. class Test :public QPaintDevice, public QWidget {
  2. public:
  3. //Метод от QPaintDevice, который требуется переопределить:
  4.  
  5. QPaintEngine* paintEngine() const {
  6. //Что должно быть здесь?
  7. }
  8. };
  9.  
  10. int main(int argc, char *argv[])
  11. {
  12. QApplication a(argc, argv);
  13. Test test;
  14. QPainter painter(&test);
  15. painter.drawLine(100, 100, 200, 200);
  16. test.show();
  17. return a.exec();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement