Skip to content

Instantly share code, notes, and snippets.

@tritium21
tritium21 / alchemical_model.py
Created September 19, 2019 08:25
SQLAlchemy to/from PyQt Adapters
#!/usr/bin/env python3
# © 2013 Mark Harviston, BSD License
# 2016: update to use PyQt5/Python3, some enhancements by Christian González
"""
Qt data models that bind to SQLAlchemy queries
"""
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtSql import QSqlTableModel
from PyQt5.Qt import QVariant, Qt
@tritium21
tritium21 / spelltextedit.py
Created September 18, 2019 08:46 — forked from ssokolow/spelltextedit.py
Spell-checked QPlainTextEdit for PyQt 5.x using PyEnchant
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""QPlainTextEdit With Inline Spell Check
Original PyQt4 Version:
https://nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check/
Copyright 2009 John Schember
Copyright 2018 Stephan Sokolow