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.QtWidgets import QWidget, QApplication, QVBoxLayout, QCheckBox, QLineEdit | |
from functools import partial | |
class Widget(QWidget): | |
def __init__(self, parent=None): | |
QWidget.__init__(self, parent) | |
self.setLayout(QVBoxLayout()) | |
self.le = QLineEdit(self) |
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, time | |
from PyQt4 import QtGui, QtCore | |
class Window(QtGui.QMainWindow): | |
def __init__(self): | |
super(Window, self).__init__() | |
self.setGeometry(50, 50, 500, 200) | |
self.setWindowTitle("TEST APP!") | |
self.field_dict = {} | |
self.home() |
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
class Stadium(QWidget): | |
def __init__(self, pixmap, parent=None): | |
QWidget.__init__(self, parent=parent) | |
self.pixmap = pixmap | |
self.pos = None | |
self.setMouseTracking(True) | |
def paintEvent(self, event): | |
painter = QPainter(self) | |
w = min(1.0*self.width()/self.pixmap.width(), 1.0*self.height()/self.pixmap.height()) |
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
from PyQt5.QtGui import QGuiApplication, QColor | |
from PyQt5.QtQml import QQmlApplicationEngine, QQmlComponent | |
from PyQt5.QtCore import QUrl, Qt, QCoreApplication, QAbstractListModel, QModelIndex, QTimer, qsrand, qrand, QTime | |
from PyQt5.QtQuick import QQuickItem | |
class Data(object): | |
def __init__(self, width=35, height=35, color=QColor("red")): | |
self._width = width | |
self._height = height | |
self._color = color |
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
from PyQt5.QtGui import * | |
from PyQt5.QtCore import * | |
from PyQt5.QtWidgets import * | |
import sys | |
class Widget(QWidget): | |
def __init__(self, parent=None): | |
QWidget.__init__(self, parent) | |
self.setLayout(QVBoxLayout()) | |
self.le = QLineEdit(":P", self) |
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
from PyQt5.QtCore import * | |
from PyQt5.QtWidgets import * | |
from PyQt5.QtGui import * | |
class QLabel_alterada(QLabel): | |
clicked=pyqtSignal() | |
def __init__(self, parent=None): | |
QLabel.__init__(self, parent) | |
print("test") |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import pandas as pd | |
from PyQt5.QtCore import QRegularExpression, pyqtSignal | |
from PyQt5.QtGui import QIcon, QRegularExpressionValidator, QValidator | |
from PyQt5.QtWidgets import QTableWidget, QApplication, QTableWidgetItem, QMenu, QInputDialog, QLineEdit, QMainWindow, \ | |
QDialog, QVBoxLayout, QLabel, QHBoxLayout, QComboBox, QToolButton, QPushButton, QSpacerItem, QSizePolicy, \ | |
QWidget, QFileDialog, QDialogButtonBox |
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
from PyQt5.QtCore import QSize, Qt | |
from PyQt5.QtGui import QPainter, QColor | |
from PyQt5.QtWidgets import QLabel, QWidget, QVBoxLayout, QApplication | |
class Led(QWidget): | |
def __init__(self, colorOn, colorOff, parent=None): | |
QLabel.__init__(self, parent) | |
self.colorOn = colorOn | |
self.colorOff = colorOff |
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
from PySide.QtCore import * | |
from PySide.QtGui import * | |
rad = 5 | |
class WindowClass(QMainWindow): | |
def __init__(self): | |
super(WindowClass, self).__init__() | |
self.view = ViewClass() |
OlderNewer