All Projects → skinex → CRUD-SQLite-

skinex / CRUD-SQLite-

Licence: GPL-3.0 license
Python 3.6, PyQT5, SQLite, CRUD

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to CRUD-SQLite-

15-minute-apps
15 minute (small) desktop apps built with PyQt
Stars: ✭ 3,469 (+16419.05%)
Mutual labels:  pyqt5
PyQt5-reorderable-list-model
Example of reorderable via drag-n-drop list model in PyQt5
Stars: ✭ 24 (+14.29%)
Mutual labels:  pyqt5
python-dersleri
Python Programlama, Masaüstü Uygulamaları, Web Geliştirme ve Daha Fazlası
Stars: ✭ 245 (+1066.67%)
Mutual labels:  pyqt5
pynocchio
🚀 A minimalist comic reader
Stars: ✭ 72 (+242.86%)
Mutual labels:  pyqt5
Browthon-Reborn
Latest version of Browthon. A clean version in Python with PyQt5
Stars: ✭ 14 (-33.33%)
Mutual labels:  pyqt5
Coda
The visual novel game (galgame) engine using PyQt5.
Stars: ✭ 23 (+9.52%)
Mutual labels:  pyqt5
Imfusion
Image fusion using Discrete Wavelet Transformation
Stars: ✭ 23 (+9.52%)
Mutual labels:  pyqt5
dunya-desktop
A modular, customizable and open-source desktop application for accessing and visualizing music data.
Stars: ✭ 76 (+261.9%)
Mutual labels:  pyqt5
QtPyConvert
An automatic Python Qt binding transpiler to the Qt.py abstraction layer.
Stars: ✭ 66 (+214.29%)
Mutual labels:  pyqt5
pdfdir
PDF导航(大纲/目录)添加工具
Stars: ✭ 195 (+828.57%)
Mutual labels:  pyqt5
pyqt5-custom-widgets
More useful widgets for PyQt5
Stars: ✭ 199 (+847.62%)
Mutual labels:  pyqt5
Hand-Digits-Recognition
Recognize your own handwritten digits with Tensorflow, embedded in a PyQT5 GUI. The Neural Network was trained on MNIST.
Stars: ✭ 11 (-47.62%)
Mutual labels:  pyqt5
Crawler4Caida
一个致力于用Python提高部门工作自动化水平的程序库!(包括数据采集、办公自动化、辅助研究、图网络、复杂系统、3D可视化等)
Stars: ✭ 82 (+290.48%)
Mutual labels:  pyqt5
gopem
GUI for OPEM library
Stars: ✭ 20 (-4.76%)
Mutual labels:  pyqt5
Beauty
从中央天气网获取七天天气数据http://www.weather.com.cn/ 搜索框联想功能,根据输入联想位置名称和城市代码 窗体呈现,每一个卡片在hover时有三个动画,上升一定高度,阴影渐变出现,offset渐变增加,卡片上方按钮渐变出现
Stars: ✭ 16 (-23.81%)
Mutual labels:  pyqt5
Grafatko
An app for creating and visualizing graphs and graph-related algorithms.
Stars: ✭ 22 (+4.76%)
Mutual labels:  pyqt5
CoronaApp
Real Time Corona App
Stars: ✭ 22 (+4.76%)
Mutual labels:  pyqt5
VaspStudio
An useful tool to submit your VASP job on HPC, manage your jobs and extract eneries...自动化VASP任务提交、计算结果提取,任务文件管理的工具
Stars: ✭ 63 (+200%)
Mutual labels:  pyqt5
TopicsExplorer
Explore your own text collection with a topic model – without prior knowledge.
Stars: ✭ 53 (+152.38%)
Mutual labels:  pyqt5
pyGISS
📡 A lightweight GIS Software in less than 100 lines of code
Stars: ✭ 114 (+442.86%)
Mutual labels:  pyqt5

CRUD-SQLite-

The program, for standard database queries, SELECT, UPDATE, INSERT, DELETE. The SQLite database was used. The user interface is created in QtDesigner. The implementation used PyQT5.

Code for connect with database:

self.db = QtSql.QSqlDatabase.addDatabase('QSQLITE')
self.db.setDatabaseName('fieldlist.db')

Select data in tableView:

self.model = QtSql.QSqlTableModel()
self.model.setTable('field')
self.model.setEditStrategy(QtSql.QSqlTableModel.OnFieldChange)
self.model.select()
self.model.setHeaderData(0, QtCore.Qt.Horizontal,"id")
self.model.setHeaderData(1, QtCore.Qt.Horizontal,"Name")
self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Surname")
self.model.setHeaderData(3, QtCore.Qt.Horizontal, "DOB")
self.model.setHeaderData(4, QtCore.Qt.Horizontal,"Phone")
self.ui.tableWidget.setModel(self.model)

Insert Data:

self.model.insertRows(self.i,1)
self.model.setData(self.model.index(self.i,1),self.ui.lineEdit.text())
self.model.setData(self.model.index(self.i, 2), self.ui.lineEdit_2.text())
self.model.setData(self.model.index(self.i,4), self.ui.lineEdit_3.text())
self.model.setData(self.model.index(self.i,3), self.ui.dateEdit.text())
self.model.submitAll()

Update Data:

if self.ui.tableWidget.currentIndex().row() > -1:
     record = self.model.record(self.ui.tableWidget.currentIndex().row())
     record.setValue("Name",self.ui.lineEdit.text())
     record.setValue("Surname",self.ui.lineEdit_2.text())
     record.setValue("DOB", self.ui.dateEdit.text())
     record.setValue("Phone", self.ui.lineEdit_3.text())
     self.model.setRecord(self.ui.tableWidget.currentIndex().row(), record)
else:
     QMessageBox.question(self,'Message', "Please select a row would you like to update", QMessageBox.Ok)
     self.show()

Delete Data:

if self.ui.tableWidget.currentIndex().row() > -1:
    self.model.removeRow(self.ui.tableWidget.currentIndex().row())
    self.i -= 1
    self.model.select()
    self.ui.lcdNumber.display(self.i)
else:
    QMessageBox.question(self,'Message', "Please select a row would you like to delete", QMessageBox.Ok)
    self.show()

alt text

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].