随笔分类 -  QT

摘要:self.tableWidget.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)self.tableWidget.horizontalHeader().setSectionResizeMode(0, QHeaderView.R 阅读全文
posted @ 2019-10-12 14:37 喵小喵~ 阅读(604) 评论(0) 推荐(0)
摘要:import sys import numpy # 一定要有,否则会出现_ufuncs错误 from cx_Freeze import setup, Executable base = None if sys.platform == 'win32': base = 'Win32GUI' options = { 'build_exe': { '... 阅读全文
posted @ 2019-09-22 10:30 喵小喵~ 阅读(413) 评论(0) 推荐(0)
摘要:1 import sys 2 from PyQt5.QtCore import * 3 from PyQt5.QtGui import * 4 from PyQt5.QtWidgets import * 5 class MyWindow(QWidget): 6 def __init__(self,parent=None): 7 super(MyWindow,self).__init__(paren 阅读全文
posted @ 2019-09-21 21:18 喵小喵~ 阅读(192) 评论(0) 推荐(0)
摘要:先安装python环境 和 pycharm 然后: PyCharm环境配置 2.1 添加QtDesigner 2.2 添加PyUIC $FileName$ -o $FileNameWithoutExtension$.py 2.3 添加Pyrcc $FileName$ -o $FileNameWith 阅读全文
posted @ 2019-09-20 11:39 喵小喵~ 阅读(583) 评论(0) 推荐(0)
摘要:/* R1 */ QDialog { background-image: url(:/images/background.png); } /* R2 */ QLabel { font: 9pt; color: rgb(0, 0, 127); } /* R3 */ QComboBox:editable, QLineEdit, QListView { color:... 阅读全文
posted @ 2018-05-14 16:56 喵小喵~ 阅读(225) 评论(0) 推荐(0)
摘要:main.cpp teapots.h teapots.cpp 阅读全文
posted @ 2018-05-14 13:09 喵小喵~ 阅读(674) 评论(0) 推荐(0)
摘要:main.cpp vowelcube.h vowelcube.cpp 阅读全文
posted @ 2018-05-13 22:24 喵小喵~ 阅读(5232) 评论(0) 推荐(0)
摘要:main.cpp tetraheaderon.h tetraheadron.cpp 阅读全文
posted @ 2018-05-13 19:00 喵小喵~ 阅读(4030) 评论(0) 推荐(0)
摘要:main.cpp bronzestyle.h bronzestyle.cpp brozedialog.h brozedialog.cpp 阅读全文
posted @ 2018-05-13 17:24 喵小喵~ 阅读(1873) 评论(0) 推荐(0)
摘要:样式: 文件格式类型: candy.qss main.cpp candydialog.h candydialog.cpp 阅读全文
posted @ 2018-05-13 14:56 喵小喵~ 阅读(1401) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 //创建一个树结构 6 void populateTree(QTreeWidget *treeWidget) 7 { 8 QStringList labels; 9 labels setHeaderLabels(labels); 12 treeWidget->header(... 阅读全文
posted @ 2018-05-12 16:01 喵小喵~ 阅读(180) 评论(0) 推荐(0)
摘要:main.cpp saxhandler.h saxhandler.cpp 阅读全文
posted @ 2018-05-12 12:32 喵小喵~ 阅读(718) 评论(0) 推荐(0)
摘要:main.cpp DomPaser.h domparser.cpp 阅读全文
posted @ 2018-05-12 09:33 喵小喵~ 阅读(213) 评论(0) 推荐(0)
摘要:1.使用QXmlStreamReader读取XML,可以读取内存中容纳不了的特大文件,或者读取在XML文档中定制的文档的内容。 xml文件(in1.xml) main.cpp xmlstreamreader.h xmlstreamreader.cpp 阅读全文
posted @ 2018-05-11 23:13 喵小喵~ 阅读(2216) 评论(0) 推荐(0)
摘要:1.模型/视图类 2.模型 3.视图 4.代理 1 模型/视图类 InterView框架提供了一些可以直接使用的模型类和视图类,如QStandardModel类,QDirModel类,QStringListModel类,以及QColumnView类,QHeaderView类,QListView类,Q 阅读全文
posted @ 2018-04-15 23:56 喵小喵~ 阅读(1550) 评论(0) 推荐(0)
摘要:1 获取本机网络与通信 在网络应用中,经常需要获得本机的主机名.IP地址和硬件地址等网络信息.运用QHostInfo,QNetWorkInterface,QNetworkAddressEntry可获得本机的网络信息. widget.h 1 #ifndef WIDGET_H 2 #define WID 阅读全文
posted @ 2018-04-14 13:44 喵小喵~ 阅读(2221) 评论(0) 推荐(0)
摘要:widget.h 1 #ifndef MAPWIDGET_H 2 #define MAPWIDGET_H 3 4 #include <QGraphicsView> 5 #include <QLabel> 6 #include <QMouseEvent> 7 8 class MapWidget : p 阅读全文
posted @ 2018-04-11 16:53 喵小喵~ 阅读(1199) 评论(0) 推荐(0)
摘要:fly.h 1 #ifndef FLY_H 2 #define FLY_H 3 #include <QObject> 4 #include <QPainter> 5 #include <QGraphicsScene> 6 #include <QGraphicsView> 7 #include <QG 阅读全文
posted @ 2018-04-11 14:26 喵小喵~ 阅读(665) 评论(0) 推荐(0)
摘要:modellex.h 1 #ifndef MODELEX_H 2 #define MODELEX_H 3 #include <QAbstractItemModel> 4 #include <QVector> 5 #include <QMap> 6 #include <QStringList> 7 # 阅读全文
posted @ 2018-04-11 13:28 喵小喵~ 阅读(3317) 评论(0) 推荐(0)
摘要:1 #include "mainwindow.h" 2 #include 3 #include 4 #include 5 #include 6 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 int main(int argc, char *argv[]) 14 { 15 ... 阅读全文
posted @ 2018-04-11 12:08 喵小喵~ 阅读(332) 评论(0) 推荐(0)