PyQt4 ShowHMDB show sqlite3 with QTableWidget summary Source Code: https://github.com/zengjfgit/Python 1. QDialog固定窗口大小: self.setFixedHeight(self.height()) self.setFixedWidth(self.width()) 2. QDialog设置窗口无问号: self.setWindowFlags(self.windowFlags() & ~…
PyQt4 里的表格部件的使用方法: QTableWidget QT下QTableWidget使用方法小结 - - 博客频道 - CSDN.NET http://blog.csdn.net/jingzhesiye/article/details/7870543 用PyQt4打造一个简易浏览器 https://www.keakon.net/2009/07/02/%E7%94%A8PyQt4%E6%89%93%E9%80%A0%E4%B8%80%E4%B8%AA%E7%AE%80%E6%98%93%…
转载地址: http://blog.sina.com.cn/s/blog_9b78c91101019sgi.html QTableWidget是QT程序中常用的显示数据表格的空间,很类似于VC.C#中的DataGrid. 说到QTableWidget,就必须讲一下它跟QTabelView的区别了.QTableWidget是QTableView的子类,主要的区别是QTableView可以使用自定义的数据模型来显示内容(也就是先要通过setModel来绑定数据源),而QTableWidget则只能使…
from PyQt4 import QtGui, QtCore class Window(QtGui.QWidget): def __init__(self, rows, columns): QtGui.QWidget.__init__(self) self.table = QtGui.QTableWidget(self) self.table.setRowCount(rows) self.table.setColumnCount(columns) for column in range(col…
# -*- coding: utf-8 -*- # python:2.x #说明:QTreeWidget用于展示树型结构,也就是层次结构同前面说的 QListWidget 类似,这个类需要同另外一个辅助类 # QTreeWidgetItem 一起使用.不过,既然是提供方面的封装类,即便是看上去很复杂的树, # 在使用这个类的时候也是显得比较简单的 __author__ = 'Administrator' from PyQt4.QtGui import  * from PyQt4.Qt impor…
# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQt4.Qt import * from PyQt4.QtCore import * lista = ['aa', 'ab', 'ac'] listb = ['ba', 'bb', 'bc'] listc = ['ca', 'cb', 'cc'] mystruct = {'A':lista, 'B':…
创建 if [ ! -d /opt/dbspace ] then mkdir /opt/dbspace fi if [ -f /opt/dbspace/.memo.db ] then rm /opt/dbspace/.memo.db; fi if [ -f /opt/dbspace/.memo.db-journal ] then rm /opt/dbspace/.memo.db-journal fi sqlite3 /opt/dbspace/.memo.db 'PRAGMA journal_mo…
# PyQt4 HardwareManager # 声明: # 本软件主要是由于朋友说想要一个产品缺陷记录软件,主要用于记录产品缺陷, # 通过产品序列号进行插入.查询,本来想用VC++ 6.0做,但是每次打开开发环境就 # 奔溃了,所以只能换一个开发环境,于是尝试用PyQt4进行原型开发,在开发过程中 # 发现,这确实是一个很好的思路,该软件可以换一种思路用于其他环境下,但就 # 目前而已,这仅仅是一个原型. # # 2015-10-23 晴 深圳 南山平山村 曾剑锋 \\\\\\\\\\\\…
转自:http://blog.csdn.net/seeground/article/details/49177387?locationNum=3&fps=1 listWidget = QListWidget() #实例化一个(item base)的列表 listWidget.addItem('dd') #添加一个项 listWidget.addItems([]) # 从序列中添加子项 listWidget.setDragEnabled(True) #设置拖拉 listWidget.sortIte…
sqlite3 API Summary sqlite3 The database connection object. Created by sqlite3_open() and destroyed by sqlite3_close(). Each open SQLite database is represented by a pointer to an instance of the opaque structure named "sqlite3". It is useful to…