src/gui/styles/qstylehelper.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   152             x2 = p1.x(); y2 = p1.y();
   152             x2 = p1.x(); y2 = p1.y();
   153             x1 = p2.x(); y1 = p2.y();
   153             x1 = p2.x(); y1 = p2.y();
   154         }
   154         }
   155 
   155 
   156         qreal m = -(y2 - y1) / (x2 - x1);
   156         qreal m = -(y2 - y1) / (x2 - x1);
   157         _angle = atan(m) *  rad_factor;
   157         _angle = qAtan(m) *  rad_factor;
   158 
   158 
   159         if (p1.x() < p2.x())
   159         if (p1.x() < p2.x())
   160             _angle = 180 - _angle;
   160             _angle = 180 - _angle;
   161         else
   161         else
   162             _angle = -_angle;
   162             _angle = -_angle;