-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmymainwindow.cpp
42 lines (38 loc) · 1.04 KB
/
mymainwindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "mymainwindow.h"
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>
#include <QEvent>
#include <QMouseEvent>
#include <QApplication>
MyMainWindow::MyMainWindow(QWidget *parent) : QMainWindow(parent)
{
//this->setWindowFlags( Qt::WindowStaysOnTopHint); //|Qt::FramelessWindowHint
resize(400, 300);
setWindowTitle("LinkGame");
setWindowIcon(QIcon(":/image/button_icon/fruit/8.png"));
}
MyMainWindow::~MyMainWindow()
{
}
void MyMainWindow::mousePressEvent(QMouseEvent *event)
{
// if (event->buttons() == Qt::LeftButton)
// {
// flag = true;
// mousePoint = event->globalPos() - this->pos();
// event->accept();
// }
}
void MyMainWindow::mouseMoveEvent(QMouseEvent *event)
{
//if (flag && (event->buttons() && Qt::LeftButton) )//&& event->pos().y() < 100 && event->pos().y() > 0)
// {
// move(event->globalPos() - mousePoint);
// event->accept();
// }
}
void MyMainWindow::mouseReleaseEvent(QMouseEvent *)
{
// flag = false;
}