- if (borderLeft.collidesWithPath(mouseArea) && borderTop.collidesWithPath(mouseArea))
- setCursor(QCursor(Qt::SizeFDiagCursor));
- else if (borderLeft.collidesWithPath(mouseArea) && borderBottom.collidesWithPath(mouseArea))
- setCursor(QCursor(Qt::SizeBDiagCursor));
- else if (borderRight.collidesWithPath(mouseArea) && borderTop.collidesWithPath(mouseArea))
- setCursor(QCursor(Qt::SizeBDiagCursor));
- else if (borderRight.collidesWithPath(mouseArea) && borderBottom.collidesWithPath(mouseArea))
- setCursor(QCursor(Qt::SizeFDiagCursor));
- else if (borderLeft.collidesWithPath(mouseArea))
- setCursor(Qt::SizeHorCursor);
- else if (borderRight.collidesWithPath(mouseArea))
- setCursor(Qt::SizeHorCursor);
- else if (borderTop.collidesWithPath(mouseArea))
- setCursor(Qt::SizeVerCursor);
- else if (borderBottom.collidesWithPath(mouseArea))
- setCursor(Qt::SizeVerCursor);
+ if (borderLeft.collidesWithPath(mouseArea) && borderTop.collidesWithPath(mouseArea) || borderRight.collidesWithPath(mouseArea) && borderBottom.collidesWithPath(mouseArea))
+ setResizeCursor(borderLeft.line().angle() - 45);
+ else if (borderLeft.collidesWithPath(mouseArea) && borderBottom.collidesWithPath(mouseArea) || borderRight.collidesWithPath(mouseArea) && borderTop.collidesWithPath(mouseArea))
+ setResizeCursor(borderLeft.line().angle() + 45);
+ else if (borderLeft.collidesWithPath(mouseArea) || borderRight.collidesWithPath(mouseArea))
+ setResizeCursor(borderLeft.line().angle());
+ else if (borderTop.collidesWithPath(mouseArea) || borderBottom.collidesWithPath(mouseArea))
+ setResizeCursor(borderTop.line().angle());