当前位置: 首页 > news >正文

mainwindow 无菜单栏 可拖动,边界可扩大,动画浮现上边框

mainwindow 无菜单栏 可拖动,边界可扩大,动画浮现上边框

#ifndef ANIMATIONWIN_H
#define ANIMATIONWIN_H

#include

namespace Ui {
class animationWin;
}

class animationWin : public QWidget
{
Q_OBJECT

public:
explicit animationWin(QWidget *parent = nullptr);
~animationWin();

private:
Ui::animationWin *ui;
};

#endif // ANIMATIONWIN_H

#include “animationwin.h”
#include “ui_animationwin.h”
#include
#include

animationWin::animationWin(QWidget parent) :
QWidget(parent),
ui(new Ui::animationWin)
{
ui->setupUi(this);
QPropertyAnimation
pAnimation = new QPropertyAnimation(this, “geometry”);

QDesktopWidget*  pDesktopWidget = QApplication::desktop();int  x = (pDesktopWidget->availableGeometry().width() - width()) / 2;int  y = (pDesktopWidget->availableGeometry().height() - height()) / 2;pAnimation->setDuration(1000);pAnimation->setStartValue(QRect(x, 0, width(), 0));pAnimation->setEndValue(QRect(x, 0, width(), height()));   //pAnimation->start(QAbstractAnimation::DeleteWhenStopped);

}

animationWin::~animationWin()
{
delete ui;
}

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include
#include
#include “animationwin.h”

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow<

http://www.lryc.cn/news/352099.html

相关文章:

  • 机器学习云环境测试
  • 扩散模型自动管道AutoPipeline
  • Map六种遍历方式
  • 集合-1 数组ArrayListLinkedList
  • 42-1 应急响应之账户排查
  • Python3 笔记:sort() 和 sorted() 的区别
  • vue 引入 emoji 表情包
  • mysql 数据库 增量备份
  • SpringBoot之@Builder 注解
  • 云计算的能源消耗如何影响环境?
  • openwrt设置开机自启 tailscale为例
  • 副业树洞聊天项目/树洞倾诉/陪陪系统源码/树洞源码下载搭建
  • UWB论文:Introduction to Impulse Radio UWB Seamless Access Systems(2):脉冲;超宽带;测距;定位
  • Spring MVC/Web
  • C++中获取int最大与最小值(补)
  • 一个开源的工具类轮子是怎么造出来的
  • 零基础学Java第二十二天之迭代器 Iterator
  • 微服务架构-异步消息传递设计模式
  • 基于SSM的大学生兼职管理系统
  • leetcode刷题记录:前缀和
  • TENT: FULLY TEST-TIME ADAPTATION BY ENTROPY MINIMIZATION--论文笔记
  • Java期末复习指南(1):知识点总结+思维导图,考试速成!
  • OpenMV学习笔记1——IDE安装与起步
  • C++设计模式|结构型 适配器模式
  • 视频码流分析工具
  • 记一次重定向问题(浏览器安全)解决
  • 【传知代码】transformer-论文复现
  • 大模型日报|今日必读的 13 篇大模型论文
  • Python 魂斗罗的音效和动漫效果
  • Raylib 绘制自定义字体的一种套路