protected:
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void state_info::mousePressEvent(QMouseEvent *event)
{
pressflag = true;
starPos = event->pos();
QWidget::mousePressEvent(event);
}
void state_info::mouseReleaseEvent(QMouseEvent *event)
{
pressflag = false;
QWidget::mouseReleaseEvent(event);
}
void state_info::mouseMoveEvent(QMouseEvent *event)
{
if(pressflag)
{
QPoint relaPos(QCursor::pos() - starPos);
move(relaPos);
}
QWidget::mouseMoveEvent(event);
}
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void state_info::mousePressEvent(QMouseEvent *event)
{
pressflag = true;
starPos = event->pos();
QWidget::mousePressEvent(event);
}
void state_info::mouseReleaseEvent(QMouseEvent *event)
{
pressflag = false;
QWidget::mouseReleaseEvent(event);
}
void state_info::mouseMoveEvent(QMouseEvent *event)
{
if(pressflag)
{
QPoint relaPos(QCursor::pos() - starPos);
move(relaPos);
}
QWidget::mouseMoveEvent(event);
}