Guest User

Untitled

a guest
Apr 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1.         void paint(QPainter *painter,const QStyleOptionGraphicsItem *option,QWidget *widget)
  2.         {
  3.             painter->save();
  4.  
  5.             if(isSelected())
  6.             {
  7.                 painter->setPen(Qt::PenStyle::CustomDashLine);
  8.                 painter->drawRect(boundingRect());
  9.             }
  10.             else
  11.             {
  12.                 painter->restore();
  13.             }
  14.         }
Add Comment
Please, Sign In to add comment