![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++ GUI QT 4
文章平均质量分 78
oLinXi1234567
这个作者很懒,什么都没留下…
展开
-
C++ GUI QT 第4版 第六章 布局管理 (1)
#ifndef FINDFILEDIALOG_H #define FINDFILEDIALOG_H #include class QCheckBox; class QLabel; class QLineEdit; class QPushButton; class QTableWidget; class FindFileDialog : public QDialog原创 2014-05-15 21:41:13 · 892 阅读 · 0 评论 -
C++ GUI QT 第4版 第二章 2.3
#ifndef GOTOCELLDIALOG_H #define GOTOCELLDIALOG_H #include #include "ui_gotocelldialog.h" class GoToCellDialog : public QDialog, public Ui::GoToCellDialog { Q_OBJECT public: G原创 2014-06-08 20:09:36 · 491 阅读 · 0 评论 -
C++ GUI QT 第4版 第一章 创建对话框
findDialog.h [cpp] view plaincopy #ifndef FINDDIALOG_H #define FINDDIALOG_H #include #include #include #include #include namespace Ui { class转载 2014-06-05 18:59:02 · 660 阅读 · 0 评论 -
C++ GUI QT 第4版 第一章 窗口部件的布局
#include #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *window = new QWidget; window->setWindowTitle("Enter Your Age");//设置标题转载 2014-06-03 21:16:28 · 838 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程(一) 线程的创建
threads.pro QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TEMPLATE = app CONFIG += console thread HEADERS = thread.h \ threaddialog原创 2014-05-12 12:18:38 · 1090 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程 -------总结
(1). QString fileName = QFileDialog::getOpenFileName(this);//使用对话框选择路径及文件名原创 2014-05-12 20:06:22 · 942 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程(三) 与主线程通讯
Qt 程序开始执行时,唯一的一个线程 —— 主线程 (main thread)也开始执行。主线程是唯一的,因为只有它才能创建 QApplication 或者是 QCoreApplication 对象,只有它才能通过应用程序对象调用 exec( ) 函数,只有它才能在 exec( ) 执行完毕后等待并处理事件。 主线程可以通过创建 QThread 子类对象开启一个新的线程,如果这些线原创 2014-05-12 19:55:53 · 1115 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程(二) 线程的同步(4)
#include #include const int DataSize = 100000; const int BufferSize = 4096; char buffer[BufferSize]; QWaitCondition bufferIsNotFull; QWaitCondition bufferIsNotEmpty; QMutex mutex; int us原创 2014-05-12 13:23:23 · 513 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程(二) 线程的同步(2)
QWaitCondition类 QWaitCondition () virtual ~QWaitCondition () bool wait ( QMutex * mutex, unsigned long time = ULONG_MAX ) void wakeOne () void wakeAll ()原创 2014-05-12 13:14:13 · 475 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程(二) 线程的同步(1)
QT中提供了一下几个可以实现线程同步的类: (1)QMutex 类 QMutex mutex定义一个互斥信号量,目的是保护对象,数据结构或代码段 步骤: mutex.lock();加锁 临近资源,代码的处理 mutex.unlock();解锁 QMutex提供了线程间的顺序访问。 QMutex的目的是保护原创 2014-05-12 13:11:04 · 705 阅读 · 0 评论 -
C++ GUI QT 第4版 之线程(二) 线程的同步(3)
#include #include const int DataSize = 100000; const int BufferSize = 4096; char buffer[BufferSize]; QSemaphore freeSpace(BufferSize); QSemaphore usedSpace(0); class Producer :原创 2014-05-12 13:17:22 · 620 阅读 · 0 评论 -
C++ GUI QT 第4版 第六章 布局管理 (4)
#include int main(int argc, char *argv[]) { QApplication app(argc, argv); QTextEdit *editor1 = new QTextEdit; QTextEdit *editor2 = new QTextEdit; QTextEdit *editor3 = new QT原创 2014-05-16 16:04:15 · 647 阅读 · 0 评论 -
C++ GUI QT 第4版 第六章 布局管理 (3)
#ifndef PREFERENCEDIALOG_H #define PREFERENCEDIALOG_H #include class QCheckBox; class QDialogButtonBox; class QGroupBox; class QLabel; class QLineEdit; class QListWidget; class QRadioBut原创 2014-05-16 15:53:35 · 703 阅读 · 0 评论 -
C++ GUI QT 第4版 第六章 布局管理 (2)
效果图是和 #ifndef FINDFILEDIALOG_H #define FINDFILEDIALOG_H #include class QCheckBox; class QLabel; class QLineEdit; class QPushButton; class QTableWidget; class FindFileDialog : publi原创 2014-05-16 15:09:15 · 625 阅读 · 0 评论 -
C++ GUI QT 第4版 第二章 2.3(3)
#ifndef SORTDIALOG_H #define SORTDIALOG_H #include #include "ui_sortdialog.h" class SortDialog : public QDialog, public Ui::SortDialog { Q_OBJECT public: SortDialog(QWidget *p原创 2014-06-09 12:31:23 · 435 阅读 · 0 评论