上一页 1 ··· 130 131 132 133 134 135 136 137 138 ··· 164 下一页
摘要: 一、QApplication、QGuiApplication、QCoreApplication 简介 1、继承关系见下图,其中左侧为顶级父类 QObject < QCoreApplication < QGuiApplication < QApplication 2、一个程序中只能有一个 QCoreA 阅读全文
posted @ 2019-09-05 23:10 天子骄龙 阅读(533) 评论(0) 推荐(0)
摘要: QMainWindow是一个为用户提供主窗口程序的类,包含一个菜单栏(menu bar)、多个工具栏(tool bars)、多个锚接部件(dock widgets)【就是浮动窗口】、一个状态栏(status bar)及一个中心部件(central widget) 阅读全文
posted @ 2019-09-03 15:26 天子骄龙 阅读(532) 评论(0) 推荐(0)
摘要: 队列queue:先进先出 import threading import queue #队列模块 import time def func(q): while True: #s=q.get() #从队列里取值.如果q里没有值,会一直处于等待状态 #q.get_nowait() #从队列里取值.如果q 阅读全文
posted @ 2019-09-03 14:27 天子骄龙 阅读(393) 评论(0) 推荐(0)
摘要: 格式: [函数对象参数] (形参) mutable 或 exception 声明 -> 返回值类型 {函数体} [函数对象参数]: []表示表达式的开始,必须有;用来设置如何捕获匿名函数外的变量 [ ]里为空 [ ]里为空,表示任何变量都不会传递给lambda表达式,没有参数 int a = 10; 阅读全文
posted @ 2019-09-02 20:36 天子骄龙 阅读(349) 评论(0) 推荐(0)
摘要: QString-->Char* str.toUtf8().data() pointf=QPointF(point); //将QPoint转换为QPointF point=pointf.toPoint(); //将QPointF转换为QPoint qreal: qreal是Qt的数据类型,在桌面操作系 阅读全文
posted @ 2019-09-02 12:45 天子骄龙 阅读(4021) 评论(0) 推荐(0)
摘要: QRect r=QRect(0,0,100,100); r.setLeft(10);//设置左上角x坐标 r.setTop(20); //设置左上角y坐标 r.setWidth(130); //设置 宽 r.setHeight(100); //设置 高 QSize s=QSize(200,150); 阅读全文
posted @ 2019-08-29 18:54 天子骄龙 阅读(4801) 评论(0) 推荐(0)
摘要: QHBoxLayout 水平布局: Header: #include <QHBoxLayout> qmake: QT += widgets Inherits:QBoxLayout 选中要布局的控件 >点击布局按钮: QVBoxLayout 垂直布局: Header: #include <QVBoxL 阅读全文
posted @ 2019-08-29 08:59 天子骄龙 阅读(251) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-08-29 08:06 天子骄龙 阅读(427) 评论(0) 推荐(0)
摘要: 自定义信号和槽 win.h #ifndef WIN_H #define WIN_H #include <QWidget> #include <QDebug> #include <QPushButton> class Win : public QWidget { Q_OBJECT public: Wi 阅读全文
posted @ 2019-08-28 14:32 天子骄龙 阅读(510) 评论(0) 推荐(0)
摘要: 需要 #include <QDir> QDir* dir=new QDir("./tu"); //创建目录对象 /* 参数1:路径 如果为“”或零,QDir使用“.”(当前目录) */ QStringList l1=dir->entryList(QDir::Files,QDir::Name); // 阅读全文
posted @ 2019-08-27 09:16 天子骄龙 阅读(1775) 评论(0) 推荐(0)
上一页 1 ··· 130 131 132 133 134 135 136 137 138 ··· 164 下一页