1 Star 0 Fork 1

三三两两/QT骨骼动画实现

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mainwindow.cpp 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
trionfordring 提交于 2020-09-28 10:31 . 补充文件
#include "mainwindow.h"
#include "mainscene.h"
#include "controller.h"
#include <QGuiApplication>
#include <QScreen>
#include <QStateMachine>
#include <QFinalState>
#include <QKeyEventTransition>
#include <QDebug>
#include <QTimer>
#include <QPushButton>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
//全屏
QScreen *screen = QGuiApplication::primaryScreen ();
QRect screenRect = screen->geometry();
resize(screenRect.width(),screenRect.height());
setWindowFlags(Qt::WindowStaysOnTopHint|Qt::X11BypassWindowManagerHint|Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
mainScene = new MainScene(screenRect,this);
mainView = new QGraphicsView(mainScene,this);
mainView->setWindowFlags(Qt::WindowStaysOnTopHint|Qt::X11BypassWindowManagerHint|Qt::FramelessWindowHint);
mainView->setAttribute(Qt::WA_TranslucentBackground);
mainView->setStyleSheet("background: transparent;border:0px");
setCentralWidget(mainView);
this->controller = new Controller(this);
//this->controller->setGeometry(1920-350,1080-20,106,166);
QPalette pal(this->controller->palette());
pal.setColor(QPalette::Background, QColor(255,255,255, 230));
controller->setAutoFillBackground(true);
controller->setPalette(pal);
this->controller->show();
}
MainWindow::~MainWindow()
{
}
void MainWindow::stopped()
{
qDebug()<<"stopped";
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/twos-threes/qt-anim-01.git
git@gitee.com:twos-threes/qt-anim-01.git
twos-threes
qt-anim-01
QT骨骼动画实现
master

搜索帮助