随笔分类 -  QT

Qt creator 5
摘要:查看按钮是否被选中 ui.radioButton53->isChecked() 选中按钮 ui.radioButton53->setChecked(true); 按钮失效 ui.radioButton53->setEnabled(false); 阅读全文
posted @ 2017-04-01 10:31 mCat 阅读(178) 评论(0) 推荐(0)
摘要:1. 信号声明 在发送信号的模块类头文件中声明信号函数 signals: void sendRate(QString rate); 2. 在发送模块的成员函数中发出信号 emit sendRate(ui.lineEdit_2->text()); 3. 在接受信号的模块头文件找中声明槽函数 priva 阅读全文
posted @ 2017-03-31 21:06 mCat 阅读(2201) 评论(0) 推荐(0)
摘要:1. 使用数值给QLineEdit赋值 GlobalPSNR 是double类型 OutBPP是float类型 QString data = QString::number(GlobalPSNR, 'g', 6); ui.textBrowser_PSN->setText(data); data = 阅读全文
posted @ 2017-03-31 21:01 mCat 阅读(306) 评论(0) 推荐(0)
摘要:功能描述: 模拟如下页面。 当输入一个字符串时打开对应的应用程序。 实现方法: 1. 建立工程 2. 界面编辑: 3. 在test1.h中添加slot声明 4. test1.cpp中添加slot定义 5. 进入test1.ui 点击F4进入编辑信号/槽模式 添加信号和槽 保存关闭文件 6. 针对输入 阅读全文
posted @ 2017-03-08 11:00 mCat 阅读(778) 评论(0) 推荐(0)
摘要:1. 安装Qt qt-creator-opensource-windows-x86-4.2.0.exe 2. 安装Qt VS插件 qt-vs-addin-1.2.5.exe 3. 配置ASSISTX 来自文章:http://www.kavenblog.com/?p=272 1、参考文章:http:/ 阅读全文
posted @ 2017-02-18 22:01 mCat 阅读(1533) 评论(0) 推荐(0)
摘要://delete.h #ifndef DELEGATE_H #define DELEGATE_H #include #include #include #include #include #include class Delegate : public QItemDelegate { Q_OBJECT public: explicit Delegate(QObject *pa... 阅读全文
posted @ 2016-12-19 17:10 mCat 阅读(740) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); QString sPath = "E:/"; dirmodel = new QFi... 阅读全文
posted @ 2016-12-19 15:33 mCat 阅读(413) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); model = new QDirModel(this); mod... 阅读全文
posted @ 2016-12-19 15:11 mCat 阅读(346) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); model = new QStringListModel(this); ... 阅读全文
posted @ 2016-12-19 11:16 mCat 阅读(171) 评论(0) 推荐(0)
摘要:qSort() qCopy() qFill() qFind() 阅读全文
posted @ 2016-12-19 10:59 mCat 阅读(415) 评论(0) 推荐(0)
摘要:#include #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QStringList List; QString Line = "a, b, c, d, f, g"; //List.append("Hello"); List =... 阅读全文
posted @ 2016-12-17 18:53 mCat 阅读(306) 评论(0) 推荐(0)
摘要:#include #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QHash Employees; Employees.insert(1,"Bob"); Employees.insert(2,"Cat"); Employees.in... 阅读全文
posted @ 2016-12-17 18:45 mCat 阅读(734) 评论(0) 推荐(1)
摘要:#include #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QMap Employees; Employees.insert(1,"Bob"); Employees.insert(2,"Cat"); Employees.ins... 阅读全文
posted @ 2016-12-17 18:41 mCat 阅读(452) 评论(0) 推荐(0)
摘要:#include #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QList List; for(int i = 0; i Iter(List); while(Iter.hasNext()) { int i =... 阅读全文
posted @ 2016-12-17 18:40 mCat 阅读(474) 评论(0) 推荐(0)
摘要:#ifndef MYTHREAD_H #define MYTHREAD_H #include class MyThread : public QThread { Q_OBJECT public: explicit MyThread(QObject *parent = 0); void run(); bool Stop; signals: void... 阅读全文
posted @ 2016-12-15 15:21 mCat 阅读(238) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); } Dialog::~Dialog() { delete ui; } v... 阅读全文
posted @ 2016-12-14 19:17 mCat 阅读(396) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); ui->treeWidget->setColumnCount... 阅读全文
posted @ 2016-12-09 21:12 mCat 阅读(107) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include #include #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); for(int i = 0; i... 阅读全文
posted @ 2016-11-29 10:55 mCat 阅读(196) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include #include #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); for(int i = 0; i... 阅读全文
posted @ 2016-11-29 10:42 mCat 阅读(121) 评论(0) 推荐(0)
摘要:#include "dialog.h" #include "ui_dialog.h" #include #include #include Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); } Dialog::~Dialog()... 阅读全文
posted @ 2016-11-29 10:33 mCat 阅读(164) 评论(0) 推荐(0)