Qsqltablemodel.setfilter

radians() (math), 371, 375 raise_() (QWidget), 160,289, 330 raising windows, 160 randint() (random), 19, 357, 371, 375 range(), 39, 50-51, 54

see also xrange() "raw" strings, 157, 220 re module, 219, 220, 554, 556 read-only models, 427 read-only widgets, 421 readAll()

QIODevice, 254 QTextStream, 384 readBool() (QDataStream), 245 readDouble() (QDataStream),241,245 readIntn() (QDataStream), 243,245, 360,435

readline() (codecs),255 readLine() (QTextStream), 252, 253, 254

readUIntn() (QDataStream), 245, 528, 540

rebinding names; see binding names recently used files, 187-190 record-level validation, 140, 491 record()

QSqlQuery, 450

QSqlQueryModel, 464, 465,466, 469 rect()

QPaintEvent, 480 QWidget, 306, 330 recursion, risk of infinite, 100 reentrant methods, 542 references; see object references regression testing, 105 regular expressions, 157,220, 327,

386,387,461, 552 "reject" button, 141,188 reject() (QDialog), 215 rejected() signal (QDialogButtonBox),

145, 150 relationModel() (QSqlRelational-

removeItem() (QGraphicsScene), 354,

355,359,361,372 removeRow() (QAbstractItemModel),

434, 466, 469 removeRows() (QAbstractItemModel),

427, 432, 434, 469 removeSelectedText() (QTextCursor),

297 render()

QGraphicsScene, 354, 361 QGraphicsView, 361 QSvgRenderer, 363 replace() (str/unicode), 25,238

reset()

QAbstractItemModel, 432,434,501, 502

QMatrix, 370, 377 resize() (QWidget), 183 resizeColumnsToContents() (QTable-

View), 232, 419, 460, 463, 490 resizeEvent() (QWidget), 306, 309, 341

resource path, root of (:/), 173 resource files, 173-174,206, 401, 517

438,482,489 restoreGeometry() (QWidget), 183,

186, 330 restoreState()

QMainWindow, 183,186 QSplitter, 282 restoring windows, 297 Return keypress; see Enter keypress return statement, 58, 97, 554 returnPressed() signal (QLineEdit), 440

rgbSwapped() (QImage), 197 rich text; see HTML RichTextLineEdit example class,

389-398 rindex() (str/unicode), 25

rollback() (QSqlDatabase), 449, 465, 469

RomanSpinBox example class,

326-328 rotate()

QGraphicsItem, 360, 366, 371, 375,

377 QPainter, 343 rotating, graphics, 349 round(), 40, 91, 333 row() (QModelIndex), 427, 491

rowCount() (QAbstractItemModel),426, 427,428,434,454,455,479,481, 503

rubber band,352

RuntimeError exception, 288

QImage, 196

QPainter, 343, 346,438,481,489 saveGeometry() (QWidget), 183, 186,

330 saveState()

QMainWindow, 183, 186 QSplitter, 282 saving files, 229,240-248,249-256,

256-265 SAX parser, 262-265 scale()

QGraphicsItem, 366 QGraphicsView, 352 QMatrix, 370 QPainter, 343 QSize, 363,400 scaled() (QImage), 199 scaling, graphics, 349, 370, 374,400 scaling, widgets, 329, 331 scene coordinates; see window coordinates scene() (QGraphicsItem), 366, 375 sceneBoundingRect() (QGraphicsItem), 366, 379

scenes, graphic; see QGraphicsScene Scintilla; see QScintilla add-on scope, 55

screen coordinates, 309, 357 screenPos() (QGraphicsSceneContext-

MenuEvent), 365 scrollbars and scrolling, 393, 476, 479

scrollToItem() (QTableWidget), 232

SDI (Single Document Interface),

283-290 search() (re),219 seek() (QSqlQuery),449,451 select() (QSqlTableModel), 453, 456,

460, 462, 464, 469 SELECT statements, 449-451 selected text, 392 selectedItems() (QGraphicsScene),

358,360,361 selectedText() (QTextCursor), 297 selecting graphics items, 352 selectionModel() (QAbstractItem-

sender() (QObject), 135,289,393,395, 440

separators, menu, 178, 180 sequences, 22 set type, 37, 38, 93, 551 add(), 37, 38, 372, 556 clear(), 38 copy(),38, 548, 551 discard(), 38 pop(), 372 remove(),38 setAcceptDrops() (QWidget), 312, 313,

314,315,316,330 setActiveWindow() (QWorkspace), 292,

295 setAlignment()

QAbstractSpinBox, 340,487 QLabel, 168, 340 QLineEdit, 461 setAllowedAreas() (QDockWidget), 169, 170

setAlternatingRowColors() (QAb-stractItemView) (QAbstractItem-View), 231,477 setAttribute() (QWidget), 156,284,

330,511 setBackgroundBrush() (QGraphics-

Scene), 354 setBottom() (QRect/QRectF), 365 setBrush() (QPainter), 337, 344, 345, 374,377, 481

setBuddy() (QLabel), 143, 425 setCalendarPopup() (QDateTimeEdit), 487

setCentralWidget() (QMainWindow),

168,186, 285 setCheckable()

QAbstractButton, 276, 278 QAction, 393 setChecked() (QAction), 172,177,393 setCodec() (QTextStream), 250,252,

254, 258, 384 setColor() (QPen), 368 setColumnCount()

QTableWidget, 231, 418 QTreeWidget, 420 setColumnHidden() (QTableView),460, 463

setColumnStretch() (QGridLayout), 146

setContent() (QDomDocument), 259 setContentHandler() (QXmlReader), 262

setContextMenuPolicy() (QWidget),

168, 330, 365 setCurrentIndex()

QAbstractItemView, 426, 465,468 QComboBox, 441,457 QDataWidgetMapper, 454,455 QStackedWidget, 275 setCurrentItem() QListWidget, 418 QTableWidget, 232,419 QTreeWidget, 421 setCursor()

QGraphicsItem, 366 QWidget, 330 setData(), 189, 231

QAbstractItemModel, 414,427,431,

434,441,462,465, 487, 488 QAction, 172,189, 392, 393 QMimeData, 316 QTableWidgetItem, 231 QTableWidgetItem, 419 setDatabaseName() (QSqlDatabase),

446, 459 setDate() (QDateTimeEdit), 487

setDateRange() (QDateTimeEdit), 452, 487

setDateTime() (QDateTime), 454 setdefault() (dict), 36,95, 532

see also defaultdict type setDefaultFont() (QTextDocument),

438,439, 489 setDisplayFormat() (QDateTimeEdit), 452, 487

setDragEnabled() (QAbstractItemView,

312,313,315,316 setDragMode() (QGraphicsView), 352 setDropAction() (QDropEvent), 314,

315,316 setEditable() (QComboBox), 440 setEditorData() (QAbstractItem-Delegate), 436, 441,462, 486, 487, 488 setEditTriggers() (QAbstractItemView), 231 setEnabled() QAction, 172 QGraphicsItem, 366 QWidget, 219, 330 setErrorHandler() (QXmlReader), 262 setFeatures() (QDockWidget), 170 setFilter() (QSqlTableModel), 464, 469

setFlag() (QGraphicsItem), 366 setFlags() (QGraphicsItem), 351, 356,

362, 364 setFocus()

QGraphicsItem, 364, 366 QWidget, 120,310,330,422 setFocusPolicy() (QWidget), 180,217,

331,369, 478 setFont()

QGraphicsItem, 362 QPainter, 344,408,482 QWidget, 330 setForwardOnly() (QSqlQuery),451 setFrameStyle() (QFrame), 170,278 setHeaderData() (QAbstractItem-

Model), 434, 460, 462 setHeaderLabels() (QTreeWidget), 420

setHorizontalHeaderLabels() (QTableWidget), 231,418 setHotSpot() (QDrag), 316 setHtml()

QMimeData, 311

QTextDocument, 403, 438, 439, 489 QTextEdit, 488 setIcon() (QListWidgetItem), 316 setImage() (QClipboard),311 setInputMask() (QLineEdit), 461 setItem() (QTableWidget), 231,419

setItemDelegate()

QAbstractItemView, 437, 460, 463, 490

QDataWidgetMapper, 456 setItemsExpandable() (QTreeView), 420

setLayout() (QWidget), 273, 279, 330 setLineWrapMode() (QTextEdit), 390 setMatrix()

QGraphicsItem, 362, 364, 367, 377 QGraphicsView, 370 QPainter, 343 setMaximumHeight() (QWidget), 390 setMimeData() QClipboard, 311 QDrag, 316 setMinimumHeight() (QWidget), 390 setMinimumSize() (QWidget), 168,340 setMinimumWidth() (QWidget), 340 setModel()

QAbstractItemView, 425,437,460,

463, 477, 490 QComboBox, 456 QDataWidgetMapper, 453, 456 setModelColumn() (QComboBox), 456 setModelData() (QAbstractItem-Delegate), 436, 441,462, 486, 487, 488

setModified() (QTextDocument), 286, 383, 384

setMouseTracking() (QWidget), 308, 334

setObjectName() (QObject), 169,183, 324

setPageSize() (QPrinter), 353, 398, 400

setPen() (QPainter), 337, 338, 343, 344, 345, 374, 377,409,410, 481 setPixmap()

QClipboard, 311 QDrag, 316 QLabel, 199 setPlainText() (QTextEdit), 384 setPointSize() (QFont), 335, 336 setPos() (QGraphicsItem), 356, 362,

364, 367, 373, 375 setPosition() (QTextCursor), 406 setProperty() (QObject), 322, 324 setQuery() (QSqlQueryModel), 464 setQuitOnLastWindowClosed() (QAp-

plication), 121 setRange()

QAbstractSlider, 369 QSpinBox, 180, 340, 440 setRelation() (QSqlRelationalTable-

Model), 456, 460, 462 setRenderHint()

QGraphicsView, 352, 369 QPainter, 306, 337, 342, 343, 361, 363

setRight() (QRect/QRectF), 365 setRowCount() (QTableWidget), 231, 418

setRowStretch() (QGridLayout), 146 setScene() (QGraphicsView), 354, 369 setSceneRect() (QGraphicsScene), 354,

369 setSelected()

QGraphicsItem, 356, 362, 364, 367 QTableWidgetItem, 232, 419 setSelectionBehavior() (QAbstract-

ItemView), 231, 460, 463,495 setSelectionMode() (QAbstractItem-

View), 231,460, 463 setSeparator() (QAction), 172 setShortcut() (QAction), 171, 172 setSingleStep() (QSpinBox),440 setSizeConstraint (QLayout), 277, 279

setSizeGripEnabled() QDialog, 154 QStatusBar, 170 setSizePolicy() (QWidget), 330, 331, 340

setSort() (QSqlTableModel), 453, 456,

460, 462 setSortingEnabled() (QTableView),

418,419 setStatusTip() QAction, 172 QWidget, 171,180 setStretchFactor() QBoxLayout, 146 QSplitter, 283 setStyleSheet() (QWidget), 323, 330 setSubmitPolicy() (QDataWidget-

Mapper), 453, 456 setSuffix() (QSpinBox), 180, 340 setTabChangesFocus() (QTextEdit), 390

setTable() (QSqlTableModel), 453,

456, 460, 462 setTabOrder() (QWidget), 206 setText()

QAbstractButton, 370 QAction, 172 QClipboard, 297, 311 QLineEdit, 441,462 setTextAlignment()

QTableWidgetItem, 231,419 QTreeWidgetItem, 421 setTextColor() (QTextEdit), 393 setToolTip() QAction, 172 QWidget, 171,180,390 setUniformRowHeights() (QTreeView), 495

setupUi() (generatedby pyuic4), 217, 218

setValidator() (QLineEdit),461 setValue()

QAbstractSlider, 128,369 QSpinBox, 128,180, 340, 441 setVersion() (QDataStream),241,243, 245, 525, 528, 531, 533, 540

setViewport() (QPainter), 329, 342,

343, 363 setVisible() (QWidget), 277, 280 setWhatsThis() (QAction), 172 setWidth() (QPen), 368 setWindow() (QPainter), 329, 342, 343, 363

setWindowFlags() (QWidget), 529 setWindowIcon() (QWidget), 186, 330 setWindowModified() (QWidget), 192 setWindowTitle() (QWidget), 146,151,

186, 330, 370 setZValue() (QGraphicsItem), 367 shallow copying, 34, 51, 98 shape() (QGraphicsItem), 365, 367,

QGraphicsItem, 367 QPainter, 343 Shift keypress, 365 short-circuit logic, 47 short-circuit signals, 130-131

see also signals and slots shortcut; see keyboard shortcut and

QKeySequence show() (QWidget), 115, 155, 280, 286,

330,511 showing dialogs, 160 showing images, 168 showing widgets, 277, 280 showMessage() (QStatusBar), 170,233 showMinimized() (QWidget), 297 showNormal() (QWidget), 297 sibling() (QModelIndex),491 SIGNAL() (QtCore), 131 signals and slots, 115, 120, 124,

127-136,206,215,217,292,307, 333, 385, 440, 482, 539, 544

see also short-circuit signals Signals and Slots application,

128-131

signature of, function, method, signal or slot, 56, 129 simplified() (QString), 61, 422 sin() (math), 371,375 single click; see mousePressEvent() and mouseReleaseEvent()

single document interface; see SDI

single-quoted strings, 21

singleShot() (QTimer), 115,306

sip module, 288

size; see QSize size grip, 170

size hint, 271

QImage, 363, 400 QRect/QRectF, 400 QSqlQuery, 450 size of layout or widget fixed, 277 maximum, 271 minimum, 270,271, 335 preferred, 271 size policies, 270-271, 335 sizeHint()

QAbstractItemDelegate, 436, 439, 489

QWidget, 335, 390, 479 sleep() (time), 114,115 slicing, 22, 30, 32 slot; see signals and slots SLOT() (QtCore), 131

_slots_class attribute, 103,115

software patents, disadvantages of, 222

sort() (list), 33, 53, 63, 95,239 sorted(), 52, 53, 63, 432,434, 551 sorting, 52, 418, 425,432-435 spacer; see QSpacerItem spacers, in layouts, 212,214 special methods, 81

special methods (cont.)

le__(

(<=), 81

len

) (len()), 93,96

lt__(

(<), 81, 82, 432

mod_

) (%), 84

mul

) (*), 84, 91

ne_(

(!=), 81

neg_

) (-), 84

new

), 77, 78, 81

spinbox; see QDoubleSpinBox and

QSpinBox split()

QString, 253

str/unicode, 25, 114,238, 501 splitter; see QSplitter SQL queries; see QSqlQuery and SQL

statements SQL Server database, 445 SQL statements, 445, 446, 447, 448, 449,449-451,458, 464,468, 469

SQLite database, 445, 446, 447 stacked widgets; see QStackedWidget standard key sequence; see keyboard shortcut and QKey-Sequence start() QDrag, 316

QThread, 539, 547, 553 QTimer, 373, 376 start-up processing, 184 startDrag() (QAbstractItemView), 316 startElement() (QXmlContentHandler), 263

startswith() (str/unicode), 25, 238, 255

startsWith() (QString), 252 startTimer() (QObject), 370 state, changes; see signals and slots state() (QAbstractSocket), 540 state, preserving using generators, 58, 97

statement separators, 51 static data, 85-86 static methods, 78, 85-86 static typing, 12 staticmethod(), 85,239,288 status bar; see QStatusBar statusBar() (QMainWindow), 170, 186 StopIteration exception, 52, 58, 59 stored procedures, in databases, 448

str type, 20-28,25 % formatting, 24, 98 %s format specifier, 26 * replication operator, 25 + concatenation operator, 25 count(), 25

endswith(), 25, 31, 555 find(), 24, 25, 68 index(), 24,25, 68 indexing, 22 isalpha(),25 isdigit(), 25,238, 554 iterating, 50

str type (cont.) lower(), 25,238 promotion to unicode, 20 replace(), 25,238 rfind(), 25 rindex(), 25 slicing, 22

split(), 25,114,238, 501 startswith(), 25,238,255 strip(), 25, 59,255 title(), 24 upper(),25

see also QString and unicode type

stream reading and writing, 242,

245, 250, 252, 258 streams; see QDataStream and

QTextStream stretch factors, 144, 212,271, 283 string literals, 20 string module, 26

Template class, 26 StringlO module, 23

see also cStringlO module strings; see QString, str type, and unicode type strip() (str/unicode), 25, 59, 255 style sheets, 322-324 sub() (re), 220, 556

subcontrols, in widgets, 324 submit() (QDataWidgetMapper), 454 submitAll() (QSqlTableModel), 455,

super(), 100, 153,217 support for keyboard users; see keyboard users, support for supportedImageFormats() QlmageReader, 193 QlmageWriter, 196 SVG (Scalable Vector Graphics) format, 363 switch statement; see if statement Sybase database, 445

sys module, 60, 63, 114 argv variable, 114 path variable, 60, 104 version_info tuple, 63 system() (platform), 200,217, 336, 390

0 -1

Post a comment