您当前的位置: 首页 >  qt

DS小龙哥

暂无认证

  • 0浏览

    0关注

    679博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

第14章 基于QT5串口设备开发(2)

DS小龙哥 发布时间:2021-10-26 20:40:50 ,浏览量:0

14.4  串口助手开发示例

 

1 uart_mainwindow.ui文件

2 uart_mainwindow.cpp
#include "uart_mainwindow.h"
#include "ui_uart_mainwindow.h"

/*
 * 设置QT界面的样式
*/
void UART_MainWindow::SetStyle(const QString &qssFile) {
    QFile file(qssFile);
    if (file.open(QFile::ReadOnly)) {
        QString qss = QLatin1String(file.readAll());
        qApp->setStyleSheet(qss);
        QString PaletteColor = qss.mid(20,7);
        qApp->setPalette(QPalette(QColor(PaletteColor)));
        file.close();
    }
    else
    {
        qApp->setStyleS
关注
打赏
1664009229
查看更多评论
立即登录/注册

微信扫码登录

0.0384s