Answer the question
In order to leave comments, you need to log in
Help with c++ error?
This error pops up:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtWidgets/QWidget>
#include <QMouseEvent>
#include <QPoint>
#include <QDebug>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint); // Отключаем оформление окна
this->setAttribute(Qt::WA_TranslucentBackground); // Делаем фон главного виджета прозрачным
}
MainWindow::~MainWindow()
{
delete ui;
}
//code starts here...
//private:
//{
// QPointF m_mousePoint;
//};
void MainWindow::on_pushButton_clicked()
{
QApplication::quit();
}
void QLabel::mouseMoveEvent(QMouseEvent* event)
{
const QPointF delta = event->globalPosition() - m_mousePoint;
move(delta.toPoint());
event->accept();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question