
客户端
草帽当家de
编程中最没用的东西是源代码,最有用的东西是算法和数据结构。
展开
-
QLabel (富文本方式) QString 字符串设置不同字体、大小、颜色等
QSize nSize(300,25); m_pStatic = new QLabel((QWidget*)GetUIWnd()); m_pStatic->resize(nSize); QString strText = QString::fromStdWString(_CS(L"<font style = 'font-size:14px; font-weight:bold'>You Can See it from this: </font> ...原创 2021-09-18 14:00:45 · 5642 阅读 · 0 评论 -
QT qDebug实现 记录打印日志的具体位置(方便代码调试)
方法:1. 包含头文件 #include <QDebug>2. 定义宏 #define cout qDebug () << "[" << _FILE_ << ":" << _LINE_ << "]"3. 调用(在需要打印日志的地方) cout << "需要打印的日志内容";...原创 2021-02-21 18:09:24 · 1108 阅读 · 0 评论 -
QT setStyleSheet 同时设置多个控件的字体类型,大小,背景等
VS + QT 环境代码如下:m_pListDev->SetStyleSheet("QTableWidget{ font-size: 18px;font-family: 'Microsoft YaHei UI';}\QTableWidget::item:selected{ background-color:rgb(235, 250, 243)}\QHeaderView::section {font-size:18px;font-family: 'Microsoft YaHei UI';fo原创 2021-01-28 21:32:14 · 8302 阅读 · 0 评论