KShare/cropeditor/cropview.cpp
ArsenArsen 1dc5813b79 Make crop editor work without workarounds on TWMs
Unless your settings are terrible
2017-08-11 22:33:56 +02:00

14 lines
685 B
C++

#include "cropview.hpp"
CropView::CropView(QGraphicsScene *scene) : QGraphicsView(scene) {
setFrameShape(QFrame::NoFrame); // Time taken to solve: A george99g and 38 minutes.
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::ToolTip);
setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
setCursor(QCursor(Qt::CrossCursor));
setMouseTracking(true);
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
setCursor(Qt::BlankCursor);
}