上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页
摘要: //一、设置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) 编辑
摘要: 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) 编辑
摘要: qt的大部分控件都是基于QWidget的,所以有时需要通过一种方法判断获取到的Widget是哪种类型的控件; 解决文案是:QWidget->metaObject()->className(), 例如: ui->label->metaObject()->className() == "QLabel"; 阅读全文
posted @ 2022-10-23 15:08 雾枫 阅读(164) 评论(0) 推荐(0) 编辑
摘要: QObject是有窗口类的父类,比如QWidget,QLabel,QPushButton等都直接或间接继承自QObject类。如果把某个窗口中的所有控件都装到一个QList<QObject*>中,那么如何区分当前的是那种类型控件呢? QObject *obj; if (obj->metaObject 阅读全文
posted @ 2022-10-23 15:07 雾枫 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-10-22 00:16 雾枫 阅读(31) 评论(0) 推荐(0) 编辑
摘要: connect(wc_object_lineEditProjectName, &QLineEdit::returnPressed, [=]() { wc_object_lineEditProjectName->clearFocus(); wc_object_toolok->clicked(true) 阅读全文
posted @ 2022-10-19 16:46 雾枫 阅读(1437) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: 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) 编辑
摘要: QVector<QVector<QString>> Vector(5); //必须先给定数组大小 Vector[i].append( wc_object_jsonobject.value("item").toString()); 阅读全文
posted @ 2022-10-12 16:45 雾枫 阅读(256) 评论(0) 推荐(0) 编辑
摘要: #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 下一页