随笔分类 - python与量化
001量化项目总结 --02获取五档买盘价格
摘要:一、获取五档买盘 price = 0.0pmarkcode = 0sip = ''sport = 0l1 = []time_now = datetime.now().minuteif (scode[0] == '0' and scode[1] == '0') or scode[0] == '3':
阅读全文
001量化项目总结 --01获取实时价格
摘要:一、获取实时价格 def tdxgetprice(self,scode): # 取实时价格 price =0.0 pmarkcode =0 sip ='' sport =0 time_now =datetime.now().minute if (scode[0]=='0' and scode[1]=
阅读全文
pycharm 命令行 打包 EXE
摘要:1、安装PyInstaller 你需要确保安装了PyInstaller。你可以在命令行中使用以下命令来安装: pip install pyinstaller 2、打包文件 1.打开对应py文件,在Terminal终端,输入:pyinstaller -F -w ’文件名‘.py
阅读全文
chf 农历日期 干支日期
摘要:1、html <script> var date = new Date(); xmltext = new XMLHttpRequest; xmltext.open("GET","2.xml",false); xmltext.send(); a = xmltext.responseXML; //doc
阅读全文
python qt5 菜单栏一级菜单响应单击事件
摘要:1、 self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar)self.actional1 = QAction(MainWindow) # 声明actionself.actional1.setT
阅读全文
python QT5 tableview 用法1
摘要:一、 链接数据库呈现查询结果 def cdb(self): dbconn = sqlite3.connect('./db/database.db') # 链接数据库 cursor = dbconn.cursor() #设置游标 sqlstr ='select * from people' curso
阅读全文
python 笔记 15 Qtableview 展示二维数据
摘要:'''显示二维表数据数据源medelMVC model(数据源) view(展示视图) contrller 控制层需要创建Qtableview 实例 和数据源model 然后将两者关联'''import sysfrom PyQt5.QtWidgets import *from PyQt5.QtGui
阅读全文
Python PyQt5中弹出子窗口解决子窗口一闪而过的问题
摘要:方法一: from PyQt5.QtWidgets import * import sys class Main(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("主窗口") button = QPus
阅读全文
python 笔记14 多窗口传递数据
摘要:多窗口传递数据 不使用信号及槽 D116.PY import sysfrom PyQt5.QtCore import *from PyQt5.QtGui import *from PyQt5.QtWidgets import *from D11602 import Datedialogclass m
阅读全文
python 笔记13 信号与槽
摘要:1、 自定义信号与槽 import sysfrom PyQt5.QtWidgets import *class ssdemo(QWidget): def __init__(self): super(ssdemo, self).__init__() self.initUI() #槽函数 def on_
阅读全文
python 笔记12 程序坐标系
摘要:import sysfrom PyQt5.QtWidgets import *def on_click(): print("ok1") print("widget.x()=%d" %widget.x()) #250 窗口横坐标 print("widget.y()=%d" %widget.y()) #
阅读全文
python 笔记9
摘要:QT 1、将UI文件转化为PY文件 Python - m pyqt5.uic.pyuic demo.ui - o demo.py 方法二: pyuic.exe demo.ui -o demo.py C:\Users\lion\PycharmProjects\pythonProject1\venv\S
阅读全文
python 笔记8
摘要:定时器 from PyQt5.Qt import *import sysclass obj(QObject): def timerEvent(self, a0: 'QTimerEvent') -> None: print(QTimerEvent,2)if __name__=='__main__':
阅读全文
python 笔记7
摘要:QT 编程模板: from PyQt5.Qt import *import sysclass Window(QWidget): def __init__(self): super().__init__() self.setWindowTitle("软件名称") self.resize(600,500
阅读全文