会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
RedWetPlace
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
15
16
17
18
19
20
21
22
23
···
33
下一页
2022年11月2日
QT——Qss样式表设置
摘要: //一、设置QgroudBox样式 /*设置groudbox边框样式后,标题会下沉,已解决*/ QGroupBox { border:1px solid rgb(227, 135, 172); margin-top: 2.3ex; border-radius:10px; font:18px; fon
阅读全文
posted @ 2022-11-02 14:01 雾枫
阅读(723)
评论(0)
推荐(0)
编辑
2022年10月25日
QT——保存数据到文件,用户选择保存路径,在该路径下生成指定格式的文件,进行保存数据
摘要: QString wc_createdata = QFileDialog::getSaveFileName(NULL, QString::fromLocal8Bit("生成报告"), tr(".csv")); if (wc_createdata.at(wc_createdata.size()-1)==
阅读全文
posted @ 2022-10-25 15:45 雾枫
阅读(202)
评论(0)
推荐(0)
编辑
2022年10月23日
qt 查看控件类型
摘要: qt的大部分控件都是基于QWidget的,所以有时需要通过一种方法判断获取到的Widget是哪种类型的控件; 解决文案是:QWidget->metaObject()->className(), 例如: ui->label->metaObject()->className() == "QLabel";
阅读全文
posted @ 2022-10-23 15:08 雾枫
阅读(164)
评论(0)
推荐(0)
编辑
Qt获取QObject对应的类名并把它转为真实类型
摘要: QObject是有窗口类的父类,比如QWidget,QLabel,QPushButton等都直接或间接继承自QObject类。如果把某个窗口中的所有控件都装到一个QList<QObject*>中,那么如何区分当前的是那种类型控件呢? QObject *obj; if (obj->metaObject
阅读全文
posted @ 2022-10-23 15:07 雾枫
阅读(426)
评论(0)
推荐(0)
编辑
2022年10月22日
QT——qt布局达不到理想状态,不妨调一下这里
摘要:
阅读全文
posted @ 2022-10-22 00:16 雾枫
阅读(31)
评论(0)
推荐(0)
编辑
2022年10月19日
QT——QlineEdit输入完数据后,回车触发按钮
摘要: connect(wc_object_lineEditProjectName, &QLineEdit::returnPressed, [=]() { wc_object_lineEditProjectName->clearFocus(); wc_object_toolok->clicked(true)
阅读全文
posted @ 2022-10-19 16:46 雾枫
阅读(1437)
评论(0)
推荐(0)
编辑
2022年10月14日
QT——设置窗口背景颜色以及透明度
摘要: void Mytoolbarwidget::_setBackgroundColor() { QColor color(255, 0, 255,25); QPalette pal(palette()); pal.setColor(QPalette::Background, color); setAut
阅读全文
posted @ 2022-10-14 21:33 雾枫
阅读(264)
评论(0)
推荐(0)
编辑
2022年10月13日
QT——QTreeWidget树形控件,点击节点,获取给节点设定的编号
摘要: connect(ui.treewidget, SIGNAL(itemClicked(QTreeWidgetItem * , int )), this,SLOT(wc_fun_treewidgetTest(QTreeWidgetItem * , int ))); void Mainwidget::wc
阅读全文
posted @ 2022-10-13 21:13 雾枫
阅读(597)
评论(0)
推荐(0)
编辑
2022年10月12日
QT——QVector二维数组使用注意事项
摘要: QVector<QVector<QString>> Vector(5); //必须先给定数组大小 Vector[i].append( wc_object_jsonobject.value("item").toString());
阅读全文
posted @ 2022-10-12 16:45 雾枫
阅读(256)
评论(0)
推荐(0)
编辑
2022年10月11日
c++中使用and
摘要: #include <iso646.h> int main() { int a =0; int b =1; bool = a and b; }
阅读全文
posted @ 2022-10-11 22:27 雾枫
阅读(185)
评论(0)
推荐(0)
编辑
上一页
1
···
15
16
17
18
19
20
21
22
23
···
33
下一页
公告