摘要: import sys from PySide2.QtWidgets import QApplication, QWidget, QPushButton, QFileDialog, \ QTableWidget, QTableWidgetItem, QHBoxLayout, QVBoxLayout, 阅读全文
posted @ 2022-02-07 11:38 Bear_Guo 阅读(41) 评论(0) 推荐(0) 编辑
摘要: from PySide2.QtWidgets import QApplication, QWidget, QPushButton, QProgressBar, QVBoxLayoutfrom PySide2.QtCore import QThread, Slot, Signalimport time 阅读全文
posted @ 2022-01-21 20:15 Bear_Guo 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 1 from PySide2.QtWidgets import QApplication, QWidget, QPushButton, QProgressBar, QVBoxLayout 2 from PySide2.QtCore import QThread, Signal, Qt 3 impor 阅读全文
posted @ 2022-01-21 11:21 Bear_Guo 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 列表推导式 语法: 变量名 = [表达式 for 变量 in 列表 for 变量 in xxx] 变量名 = [表达式 for 变量 in 列表 if 条件] 快速创建一个包含元素1-10的列表 list1 = [i for i in range(1, 11)] print(list1) 运行结果: 阅读全文
posted @ 2022-01-18 23:21 Bear_Guo 阅读(27) 评论(0) 推荐(0) 编辑
摘要: Hydro Erosion Rate : 侵蚀速度,值越大侵蚀速度越快。 Bank Angle (默认70): 值越小,得到的水域就越宽并且平坦。水域边缘处与山相接的地方就越 smooth.反之,转折较硬,边缘清晰。 Spread Iteration(默认20): 水域带迭代次数,值越小,解算速度越 阅读全文
posted @ 2021-10-26 22:45 Bear_Guo 阅读(50) 评论(0) 推荐(0) 编辑
摘要: float mindist = 999999.9; int index = -1; for(int i = 0; i< npoints(1); i++) { vector pos = point(1, 'P', i); //float distance = sqrt(pow(pos.x - @P.x 阅读全文
posted @ 2021-10-15 15:23 Bear_Guo 阅读(38) 评论(0) 推荐(0) 编辑
摘要: //Create a line with pointsint pt_max = chi("Point_Max"); float length = chf("Length"); vector dir = chv("Direction"); dir = normalize(dir); vector of 阅读全文
posted @ 2020-04-12 00:25 Bear_Guo 阅读(92) 评论(0) 推荐(0) 编辑
摘要: void painter::paintEvent(QPaintEvent *e) { QPainter pt(this); QPen pen1(Qt::black); pen1.setWidth(2); QPen pen2(Qt::red); pen2.setWidth(5); QPoint p1; 阅读全文
posted @ 2018-06-12 23:35 Bear_Guo 阅读(329) 评论(0) 推荐(0) 编辑
摘要: #ifndef MYDIALOG_H #define MYDIALOG_H #include"mythread.h" #include<QPushButton> #include<QLabel> #include<QHBoxLayout> #include <QString> class MyDia 阅读全文
posted @ 2018-05-09 20:41 Bear_Guo 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 1. YT_11_QDir 创建目录 C:/text/ggg,如果目录不存在就创建它。 获取指定路径下的全部文件夹路径作为列表,并输出该列表。 2. YT_12_QFile // 使用QFile 读取 和 保存 txt文件以及内容。 #include <QCoreApplication> #incl 阅读全文
posted @ 2018-05-06 18:25 Bear_Guo 阅读(117) 评论(0) 推荐(0) 编辑