This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Based on https://stackoverflow.com/a/76096769" | |
import sys | |
from PyQt6.QtWidgets import QApplication, QWidget, QToolButton, QComboBox, QVBoxLayout, QHBoxLayout | |
from PyQt6.QtGui import QIcon, QIconEngine, QPainter | |
from PyQt6.QtCore import QSize, QRect | |
themes = ['light', 'dark'] | |
active_theme = themes[0] | |
light = ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is a demo of updating progress using a singleton class. This allow each class to | |
report its own progress without changing the argument list so that all functions recieve | |
a progrees object. | |
""" | |
from threading import Thread | |
import time | |
import sys | |
from PyQt5 import QtCore, QtWidgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtCore import pyqtSignal, QRegularExpression | |
from PyQt5.QtWidgets import (QApplication, QFrame, QLabel, QLineEdit, | |
QHBoxLayout, QVBoxLayout, QWidget, QPushButton) | |
class FormGroup(QWidget): | |
groupValidation = pyqtSignal(bool) | |
def __init__(self, orientation='vertical'): | |
super().__init__() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtCore import QTimer | |
from PyQt5.QtWidgets import (QApplication, QMainWindow, QOpenGLWidget, | |
QAction, QActionGroup, QFileDialog) | |
from OpenGL import GLU, GL | |
import numpy as np | |
class GLWidget(QOpenGLWidget): | |
def __init__(self, parent=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtCore import Qt | |
from PyQt5.QtGui import QPixmap | |
from PyQt5.QtWidgets import (QApplication, QDialog, QWidget, | |
QLabel, QLineEdit, QHBoxLayout, QVBoxLayout, QPushButton, | |
QButtonGroup, QStackedLayout) | |
class Dialog(QDialog): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
from PyQt5 import QtCore, QtWidgets, QtGui | |
Qt = QtCore.Qt | |
class NumpyModel(QtCore.QAbstractTableModel): | |
def __init__(self, narray, parent=None): | |
QtCore.QAbstractTableModel.__init__(self, parent) | |
self._array = narray.point | |
self.test = narray.enabled |