Implemented hand dragging cursor

This commit is contained in:
2020-03-07 15:56:49 +01:00
parent 8f052e70b9
commit 05abbcbe8e
3 changed files with 5 additions and 1 deletions

View File

@@ -1,7 +1,6 @@
#include <QApplication>
#include "mainwindow.h"
#include "stripwidget.h"
int main(int argc, char *argv[])
{

View File

@@ -94,9 +94,11 @@ void StripWidget::setOwner(const QString &owner)
void StripWidget::beginDrag()
{
setGraphicsEffect(new QGraphicsOpacityEffect);
m_ui->title->setCursor(Qt::ClosedHandCursor);
}
void StripWidget::endDrag()
{
setGraphicsEffect(nullptr);
m_ui->title->setCursor(Qt::OpenHandCursor);
}

View File

@@ -29,6 +29,9 @@
<pointsize>13</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>