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 QtQuick 2.0 | |
ListView { | |
width: 640; height: 480 | |
model: myModel | |
delegate: Text { | |
text: name + ": " + link + ", " + time | |
} | |
} |
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 PySide import QtGui, QtCore | |
class AssetDelegate(QtGui.QStyledItemDelegate): | |
def paint(self, painter, option, index): | |
if isinstance(self.parent(), QtGui.QAbstractItemView): | |
self.parent().openPersistentEditor(index) | |
QtGui.QStyledItemDelegate.paint(self, painter, option, index) |
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 math import ceil | |
"""from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtWidgets import *""" | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
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 socket | |
import sys | |
import time | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
from PyQt5.QtCore import QThread | |
from klient_gui import Ui_MainWindow | |
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 PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
from PyQt4.QtWebKit import * | |
if __name__ == '__main__': | |
app = QApplication(sys.argv) | |
view = QWebView() | |
view.settings().setAttribute(QWebSettings.JavascriptEnabled, True) |
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 pyqtSlot, QSortFilterProxyModel, Qt, QUrl, QDir, QAbstractListModel | |
from PyQt5.QtGui import QGuiApplication | |
from PyQt5.QtQml import QQmlApplicationEngine | |
class SortProxyModel(QSortFilterProxyModel): | |
@pyqtSlot(str, int) | |
def sortData(self, roleName, order): |
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 pyqtSlot, QSortFilterProxyModel, Qt, QUrl, QDir, QAbstractListModel | |
from PyQt5.QtGui import QGuiApplication | |
from PyQt5.QtQml import QQmlApplicationEngine | |
class SortProxyModel(QSortFilterProxyModel): | |
@pyqtSlot(str, Qt.SortOrder) | |
def sortData(self, roleName, order): |
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 PySide2.QtWidgets import * | |
from PySide2.QtCore import * | |
class Model(QAbstractTableModel): | |
def __init__(self, cycles = [[]], headers = [], parent = None): | |
QAbstractTableModel.__init__(self, parent) | |
self.cycles = cycles | |
self.headers = headers | |
self.values_checked = [] | |
self.column_count = len(self.cycles[0]) |
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 PySide2.QtCore import Qt, QSize, QRect, QEvent | |
from PySide2.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QApplication, QStyle, QTableWidget, \ | |
QTableWidgetItem | |
class ItemDelegate(QStyledItemDelegate): | |
def paint(self, painter, option, index): | |
opt = QStyleOptionViewItem(option) | |
if index.column() == 0: | |
textMargin = QApplication.style().pixelMetric(QStyle.PM_FocusFrameHMargin) + 1 |
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.QtWidgets import * | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtSql import * | |
import sys | |
class ImportFilter (QDialog): | |
def __init__(self): | |
super().__init__() | |
self.initUI() |