上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页
摘要: QLabel#m_title { color:white; font-family: "New Century Schoolbook"; /* 设置字体 */ font-size: 40px ; /* 设置字体大小 */ font-style: italic; /* 设置字体倾斜 */ font-w 阅读全文
posted @ 2024-02-12 20:08 雾枫 阅读(245) 评论(0) 推荐(0) 编辑
摘要: QLabel#m_icon { border-image: url(:/res/haiyang.png); /* 图片路径 */ min-width : 40px; /* 最小宽度 */ min-height : 40px; /* 最小高度 */ max-width : 40px; /* 最大宽度 阅读全文
posted @ 2024-02-12 19:56 雾枫 阅读(329) 评论(0) 推荐(0) 编辑
摘要: // 头文件 #ifndef TITLEBAR_H #define TITLEBAR_H #include <QWidget> #include <QPoint> //坐标点 #include <QMouseEvent> //鼠标事件 class TitleBar : public QWidget 阅读全文
posted @ 2024-02-11 22:59 雾枫 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1、创建一个QWidget 对象 2、在QWidget对象内添加控件进行布局 3、给QScrollArea调用setwidget函数,设置QWidget对象。 阅读全文
posted @ 2024-01-29 11:17 雾枫 阅读(39) 评论(0) 推荐(0) 编辑
摘要: MyOpenglWidget::MyOpenglWidget(QWidget *parent) : QOpenGLWidget{parent} { auto &mysignal = MySignal::instance(); // 绘制和清空 connect(&mysignal,&MySignal: 阅读全文
posted @ 2024-01-14 19:36 雾枫 阅读(86) 评论(0) 推荐(0) 编辑
摘要: #include "mainwindow.h" #include <qpainter.h> #include <QDebug> #include <QPainterPath> #include <QtWinExtras> #include <QRectF> #include <QDesktopWid 阅读全文
posted @ 2024-01-01 00:25 雾枫 阅读(142) 评论(0) 推荐(0) 编辑
摘要: cmake_minimum_required(VERSION 3.24.2) project(test LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOUIC ON 阅读全文
posted @ 2023-12-31 18:26 雾枫 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 先代码设置MainWindow图标: // 主要用于在linux下运行程序时,在任务栏显示图标MainWindow w; w.setWindowIcon(QIcon(":/res/icon.png")); (*windows下设置生成的exe程序的ico图标后,默认也会对运行程序时任务栏的图标也设置 阅读全文
posted @ 2023-12-27 21:54 雾枫 阅读(289) 评论(0) 推荐(1) 编辑
摘要: 原文链接:https://blog.csdn.net/qq_27597629/article/details/108886199#:~:text=1%EF%BC%8C%E5%88%9B%E5%BB%BA%E7%A8%8B%E5%BA%8F%E5%90%AF%E5%8A%A8%E8%84%9A%E6% 阅读全文
posted @ 2023-12-27 20:17 雾枫 阅读(177) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页