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

什么网站可以免费做视频的软件seo在线推广

什么网站可以免费做视频的软件,seo在线推广,济南ui设计制作培训,网上营销的概念一、坑之所在 1.写了StyleSheet的QString并进行了设置 this->setStyleSheet(styleSheet_M);2.注释后,将StyleSheet换到UI form里去,然后又手动清理了UI form里的StyleSheet 重新使用代码设置,此时代码设置失效了 二、根本解决 1.手动从…

一、坑之所在

1.写了StyleSheet的QString并进行了设置

this->setStyleSheet(styleSheet_M);

2.注释后,将StyleSheet换到UI form里去,然后又手动清理了UI form里的StyleSheet
重新使用代码设置,此时代码设置失效了

二、根本解决

1.手动从UI form里删掉StyleSheet也没用,还要删除widget.ui 文件里的styleSheet属性
widget.ui:

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"><class>Widget</class><widget class="QWidget" name="Widget"><property name="geometry"><rect><x>0</x><y>0</y><width>500</width><height>341</height></rect></property><property name="windowTitle"><string>Widget</string></property><property name="styleSheet"><string notr="true"/></property></widget><resources/><connections/>
</ui>

2.用其他编辑器打开 widget.ui 后,删除空的 styleSheet 属性:

  <property name="styleSheet"><string notr="true"/></property>

3.然后就可以了
在这里插入图片描述

三、源码

widget.h:

#ifndef WIDGET_H
#define WIDGET_H#include <QDebug>
#include <QWidget>
#include <QListWidget>
#include <QPushButton>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QMessageBox>class TableItemWidget : public QWidget {Q_OBJECTpublic:explicit TableItemWidget(const QString &lineName, QWidget *parent = nullptr) : QWidget(parent) {QHBoxLayout *layout = new QHBoxLayout(this);// 左边的文字QLabel *label = new QLabel(this);layout->addWidget(label);// 右边的按钮QPushButton *button = new QPushButton(this);button->setIcon(QIcon(":/icons/settings.png"));  // 替换为实际的图标路径layout->addStretch();  // 在按钮前添加一个伸缩空间,使按钮在右边layout->addWidget(button);// 按钮点击事件connect(button, &QPushButton::clicked, this, [=]() {//QMessageBox::information(this, "按钮点击", lineName + " 的设置按钮被点击了!");qDebug() << "按钮点击,你点击了按钮:" << lineName;});setLayout(layout);}
};QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACEclass Widget : public QWidget
{Q_OBJECTpublic:Widget(QWidget *parent = nullptr);~Widget();private:Ui::Widget *ui;
};const QString styleSheet_M = R"(/* 整体窗口的背景颜色 */QWidget {color: #ECEFF4;font-family: "Arial";font-size: 14px;}/* QListWidget 样式 */QListWidget {background-color: #3B4252;border: 1px solid #4C566A;border-radius: 5px;}/* QListWidget item 样式 */QListWidget::item {background-color: #4C566A;padding: 3px;border-bottom: 2px solid #434C5E;}/* 鼠标悬停时的 item 样式 */QListWidget::item:hover {background-color: #5E81AC;color: white;}/* 被选中时的 item 样式 */QListWidget::item:selected {background-color: #88C0D0;color: black;}/* 调整 QPushButton 的尺寸和外观 */QPushButton {background-color: #4C566A;color: #ECEFF4;border: 1px solid #434C5E;border-radius: 5px;padding: 5px 10px;min-width: 20px; /* 设置按钮的最小宽度 */min-height: 20px; /* 设置按钮的最小高度 */}/* 鼠标悬停时的按钮样式 */QPushButton:hover {background-color: #5E81AC;border: 2px solid #88C0D0;}/* 按下时的按钮样式 */QPushButton:pressed {background-color: #88C0D0;color: black;}/* 设置滚动条样式 */QScrollBar:vertical {width: 10px;background: transparent;margin: 2px 2px 0px 0px;border-radius: 5px;}QScrollBar::handle:vertical {width: 10px;background: rgb(140, 140, 140);border-radius: 5px;}QScrollBar::handle:vertical:hover {background: rgb(120, 120, 120);}QScrollBar::add-line:vertical,QScrollBar::sub-line:vertical {width: 0px;height: 0px;border-radius: 5px; /* Optional if border-radius is not visible */}QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical {background: transparent;border-radius: 5px;})";#endif // WIDGET_H

widget.cpp:

#include "widget.h"
#include "ui_widget.h"Widget::~Widget()
{delete ui;
}Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
{QVBoxLayout *mainLayout = new QVBoxLayout(this);this->setStyleSheet(styleSheet_M);// 创建 QListWidget 来容纳每个预置位项目QListWidget *tableList = new QListWidget(this);// 添加自定义的行项目for (int i = 0; i < 255; ++i) {QListWidgetItem *item = new QListWidgetItem(tableList);TableItemWidget *tableWidget = new TableItemWidget(QString("Table Line %1").arg(i), this);// 设置行高度item->setSizeHint(tableWidget->sizeHint());item->setText(QString("Table Line %1").arg(i));item->setIcon(QIcon());  // 明确设置为空图标tableList->addItem(item);tableList->setItemWidget(item, tableWidget);}mainLayout->addWidget(tableList);setLayout(mainLayout);// 行点击事件处理connect(tableList, &QListWidget::itemClicked, this, [=](QListWidgetItem *item) {//QMessageBox::information(this, "行点击", "你点击了行: " + item->text());qDebug() << "行点击,你点击了行:" << item->text();});ui->setupUi(this);
}
http://www.hkea.cn/news/240562/

相关文章:

  • 营销网站定制的优势成品网站源码的优化技巧
  • 高职学院网站建设方案广告制作
  • table表格 做的网站营销案例分析报告模板
  • pc端网站做移动适配教育培训机构管理系统
  • 页游传奇排行榜无锡seo优化公司
  • 广西南宁网站设计百度seo算法
  • 网站建设服务怎么样近期国内热点新闻事件
  • 阿里巴巴网站国际站建设seo托管服务
  • 企业网站优化之如何做需求分析网奇seo赚钱培训
  • 施工企业会计制度收入确认规定百度自然排名优化
  • 校园网站建设意义网络营销的特点有哪些
  • 内江做网站哪里便宜google搜索关键词热度
  • 福建省建设银行招聘网站网络推广员压力大吗
  • 动态网站订单怎么做搜索引擎优化营销
  • html5行业网站最近有哪些新闻
  • 做网站业务的怎么寻找客户在哪里打广告效果最好
  • 广东深圳seo服务内容
  • 做网站怎么备案网络服务有限公司
  • 网站主页特效欣赏百度官网下载电脑版
  • php mysql开发网站开发任何小说都能搜到的软件
  • the7 wordpress主题宁波seo外包费用
  • 云南建筑培训网seo刷点击软件
  • 男女做暖网站h5页面制作平台
  • 可以做puzzle的网站百度关键词排名提升工具
  • 竞网网站建设南宁网站seo大概多少钱
  • 114黄页信息网宝鸡seo培训
  • 东南亚做棋牌网站挖掘爱站网
  • 中国工程建设招标网官方网站谷歌查询关键词的工具叫什么
  • wordpress管理员密码忘记成都seo招聘
  • 武汉企业建站系统模板下载官方正版百度