Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(42)  |  Call(27)  |  Derive(2)  |  Import(13)

src/p/y/pyqt5-HEAD/examples/itemviews/spreadsheet/spreadsheet.py   pyqt5(Download)
from PyQt5.QtCore import QDate, QPoint, Qt
from PyQt5.QtGui import QColor, QIcon, QKeySequence, QPainter, QPixmap
from PyQt5.QtWidgets import (QAction, QActionGroup, QApplication, QColorDialog,
        QComboBox, QDialog, QFontDialog, QGroupBox, QHBoxLayout, QLabel,
        QLineEdit, QMainWindow, QMessageBox, QPushButton, QTableWidget,
        for c in range(cols):
            character = chr(ord('A') + c)
            self.table.setHorizontalHeaderItem(c, QTableWidgetItem(character))
 
        self.table.setItemPrototype(self.table.item(rows - 1, cols - 1))

src/p/y/pyqt5-HEAD/examples/itemviews/stardelegate.py   pyqt5(Download)
from PyQt5.QtCore import pyqtSignal, QPointF, QSize, Qt
from PyQt5.QtGui import QPainter, QPolygonF
from PyQt5.QtWidgets import (QAbstractItemView, QApplication, QStyle,
        QStyledItemDelegate, QTableWidget, QTableWidgetItem, QWidget)
 
 
    for row, (title, genre, artist, rating) in enumerate(staticData):
        item0 = QTableWidgetItem(title)
        item1 = QTableWidgetItem(genre)
        item2 = QTableWidgetItem(artist)
        item3 = QTableWidgetItem()

src/p/y/pyqt5-HEAD/examples/richtext/orderform.py   pyqt5(Download)
from PyQt5.QtGui import (QFont, QTextCharFormat, QTextCursor, QTextFrameFormat,
        QTextLength, QTextTableFormat)
from PyQt5.QtWidgets import (QApplication, QCheckBox, QDialog,
        QDialogButtonBox, QGridLayout, QLabel, QLineEdit, QMainWindow,
        QMessageBox, QMenu, QTableWidget, QTableWidgetItem, QTabWidget,
    def setupItemsTable(self):
        self.itemsTable = QTableWidget(len(self.items), 2)
 
        for row, item in enumerate(self.items):
            name = QTableWidgetItem(item)
            name.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable)
            self.itemsTable.setItem(row, 0, name)
            quantity = QTableWidgetItem('1')

src/p/y/pyqt5-HEAD/examples/dialogs/findfiles.py   pyqt5(Download)
        QUrl)
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import (QAbstractItemView, QApplication, QComboBox,
        QDialog, QFileDialog, QGridLayout, QHBoxLayout, QHeaderView, QLabel,
        QProgressDialog, QPushButton, QSizePolicy, QTableWidget,
            size = QFileInfo(file).size()
 
            fileNameItem = QTableWidgetItem(fn)
            fileNameItem.setFlags(fileNameItem.flags() ^ Qt.ItemIsEditable)
            sizeItem = QTableWidgetItem("%d KB" % (int((size + 1023) / 1024)))

src/p/y/pyqt5-HEAD/examples/itemviews/coloreditorfactory.py   pyqt5(Download)
from PyQt5.QtCore import pyqtProperty, Qt, QVariant
from PyQt5.QtGui import QColor
from PyQt5.QtWidgets import (QApplication, QComboBox, QGridLayout,
        QItemEditorCreatorBase, QItemEditorFactory, QTableWidget,
        QTableWidgetItem, QWidget)
 
        for i, (name, color) in enumerate(tableData):
            nameItem = QTableWidgetItem(name)
            colorItem = QTableWidgetItem()
            colorItem.setData(Qt.DisplayRole, color)

src/p/y/pyqt5-HEAD/examples/widgets/icons/icons.py   pyqt5(Download)
from PyQt5.QtCore import QFileInfo, QRegExp, QSize, Qt
from PyQt5.QtGui import QIcon, QImage, QPalette, QPixmap
from PyQt5.QtWidgets import (QAbstractItemView, QAction, QActionGroup,
        QApplication, QComboBox, QFileDialog, QFrame, QGridLayout, QGroupBox,
        QHBoxLayout, QHeaderView, QItemDelegate, QLabel, QMainWindow,
 
            imageName = QFileInfo(fileName).baseName()
            item0 = QTableWidgetItem(imageName)
            item0.setData(Qt.UserRole, fileName)
            item0.setFlags(item0.flags() & ~Qt.ItemIsEditable)
 
            item1 = QTableWidgetItem("Normal")
            item2 = QTableWidgetItem("Off")

src/p/y/pyqt5-HEAD/examples/draganddrop/dropsite.py   pyqt5(Download)
from PyQt5.QtCore import pyqtSignal, QMimeData, Qt
from PyQt5.QtGui import QPalette, QPixmap
from PyQt5.QtWidgets import (QAbstractItemView, QApplication, QDialogButtonBox,
        QFrame, QLabel, QPushButton, QTableWidget, QTableWidgetItem,
        QVBoxLayout, QWidget)
 
        for format in mimeData.formats():
            formatItem = QTableWidgetItem(format)
            formatItem.setFlags(Qt.ItemIsEnabled)
            formatItem.setTextAlignment(Qt.AlignTop | Qt.AlignLeft)
            row = self.formatsTable.rowCount()
            self.formatsTable.insertRow(row)
            self.formatsTable.setItem(row, 0, QTableWidgetItem(format))
            self.formatsTable.setItem(row, 1, QTableWidgetItem(text))
 

src/p/y/pyqt5-HEAD/examples/tools/settingseditor/settingseditor.py   pyqt5(Download)
        QRegExp, QSettings, QSize, Qt, QTime, QTimer)
from PyQt5.QtGui import QColor, QIcon, QRegExpValidator, QValidator
from PyQt5.QtWidgets import (QAbstractItemView, QAction, QApplication,
        QComboBox, QDialog, QDialogButtonBox, QFileDialog, QGridLayout,
        QGroupBox, QHeaderView, QInputDialog, QItemDelegate, QLabel, QLineEdit,
                self.locationsTable.setRowCount(row + 1)
 
                item0 = QTableWidgetItem()
                item0.setText(settings.fileName())
 
                item1 = QTableWidgetItem()

src/p/y/pyqt5-HEAD/examples/multimedia/audiodevices/ui_audiodevicesbase.py   pyqt5(Download)
        self.allFormatsTable.setColumnCount(6)
        self.allFormatsTable.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter)
        self.allFormatsTable.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter)
        self.allFormatsTable.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter)
        self.allFormatsTable.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter)
        self.allFormatsTable.setHorizontalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()

src/p/y/pyqt5-HEAD/examples/multimedia/audiodevices/audiodevices.py   pyqt5(Download)
 
from PyQt5.QtMultimedia import QAudio, QAudioDeviceInfo, QAudioFormat
from PyQt5.QtWidgets import QApplication, QTableWidgetItem, QMainWindow
 
from ui_audiodevicesbase import Ui_AudioDevicesBase
    def setFormatValue(self, row, column, value):
        self.allFormatsTable.setItem(row, column, QTableWidgetItem(value))
 
    def sampleRateChanged(self, idx):
        self.settings.setSampleRate(int(self.sampleRateBox.itemText(idx)))

  1 | 2  Next