Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include "dalle.h"
  2.  
  3. Dalle::Dalle()
  4. {
  5. but = QPixmap::fromImage(QImage("but.png").scaled(20, 20));
  6. setPos(100,100);
  7. }
  8.  
  9. QRectF Dalle::boundingRect() const
  10. {
  11. return QRectF(100,100,50,50);
  12. }
  13.  
  14. void Dalle::paint(QPainter *painter, const QStyleOptionGraphicsItem *,
  15. QWidget *)
  16. {
  17. painter->drawPixmap(0,0,but);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement