Pyqt Setsortingenabled Qsqlquerymodel

page size, printer, 400 Page Designer application, 351-368 pageRect() (QPrinter), 408 paint devices; see QImage, QPainter, QPicture, QPixmap, QPrinter, QSvgGenerator, and QWidget paint()

QAbstractItemDelegate, 436,438,

461, 486, 489 QGraphicsItem, 366, 368, 374, 377 paintEvent() (QWidget), 306, 309, 336,

342,480 palette; see QPalette palette()

QApplication, 438, 489 QWidget, 337 parameters, 55, 56 default, 56 keyword, 55, 59-61 passing by value, 57 positional, 55 parent() (QObject), 433, 504 parent, of widget, 118,119,172,340, 372

parenting, automatic, 119 parse() (QXmlReader), 262 parsing XML, 259-262,262-265 partial() example, 64-65 partial() (functools), 64-65,133, 365

partial function application, 63-65,

133, 365 pass-by-value, 57 pass statement, 47 pasteboard; see QClipboard patents, disadvantages of, for software, 222 path() (QFileInfo), 233, 356 path variable (sys), 60,104 PDF (Portable Document Format),

398, 401 pen width, 144

physical coordinates; see viewport coordinates pickle() (copy_reg), 247 pickle module, 235, 246-248

see also cPickle module pixmap; see QPixmap pixmap()

QClipboard, 311 QGraphicsPixmapItem, 359 platform module python_version(), 200 system(), 200,217, 336, 390 .png (image file), 193 pointers; see object references policies for file error handling, 244 size and layout, 270-271, 335 strings, 28, 228 polymorphism, 99-103 pop(), 96 dict, 36, 96 list, 33, 355, 361 set, 372 popitem() (dict), 96 populating list widgets, 418 populating table widgets, 418 populating trees, 420, 502 portable document format; see PDF pos()

QCursor, 318, 357 QGraphicsItem, 359, 366 QMouseEvent, 309 positional arguments, 55 post-mortem validation, 140, 150, 151

PostgreSQL database, 445 PostScript, 401 pow(),40

preferred size, of layouts and widgets, 271,335 prepare() (QSqlQuery), 448,450, 468 prepared queries, 447 prepend() (QStringList), 189 preserving aspect ratio, 329 preventative validation, 140, 157,

159, 162, 327 previewing forms, 215 previous() (QSqlQuery), 449,450

print statement, 10,26 trailing comma, 49 print_() (QTextDocument), 403,407 printer; see QPrinter printImage() helper, 363 printing, 170, 363, 398-410 printing images, 363 private names, 76, 80, 88 .pro (C++/Qt project file), 518 processEvents() (QCoreApplication),

294, 537 processing, at start-up, 184 propagating hide and show calls, 280

properties, 80,211, 322 properties, of QObjects, 157,211 property() built-in, 80 QObject, 322, 324 .py and .pyw (Python file), 11,111, 207

.pyc and .pyo (Python bytecode file), 11,207

pylupdate4 application, 207, 513, 517,518

PyQt4 modules; see the individual modules, QtCore, QtGui, etc. pyqtProperty() (QtCore), 322 @pyqtSignature decorator (QtCore),

218,219 PYQT_VERSION_STR variable, 200 pyrcc4 application, 173, 174, 207 python_version() (platform), 200 pyuic4 application, 206,207,216, 221,515

QAbstractButton (QtGui) base class, QWidget setCheckable(), 276,278 setText(), 370 toggled() signal, 277,280 QAbstractItemDelegate (QtGui) base class, QObject

QAbstractItemDelegate (QtGui) (cont.) createEditor(), 436, 440,461, 486,487,488, 491 paint(), 436, 438,461,486,489 setEditorData(), 436,441, 462, 486, 487, 488 setModelData(), 436, 441,462, 486, 487, 488 sizeHint(), 436, 439, 489 QAbstractItemModel (QtCore), 425, 433, 434, 445, 500 base class, QObject beginInsertRows(), 432,433 beginRemoveRows(), 433 columnCount(),427,428,433, 503 createIndex(),433, 504 data(), 414, 427, 428, 429,430, 433,438,441,462,481,487,488, 489,491, 496, 503 dataChanged() signal, 431,432, 478

endInsertRows(), 432,433 endRemoveRows(), 432,433 flags(), 427, 430, 433 hasChildren(),433 headerData(), 427, 430, 433, 503 index(), 433,465, 468, 504 insertRow(), 433, 465,468 insertRows(), 426, 427, 432,433 removeRow(), 434, 466, 469 removeRows(), 427, 432,434,469 reset(), 432,434, 501,502 rowCount(), 426, 427,428, 434, 454,455, 479,481, 503 setData(), 414,427,431,434,441,

462, 465, 487, 488 setHeaderData(), 434,460,462 QAbstractItemView (QtGui)

base class, QAbstractScrollArea currentIndex(), 427, 463,465,

466, 468, 469 edit(),426,465,468 selectionModel(),463 setAlternatingRowColors(), 231, 477

setCurrentIndex(), 426, 465,468

604

Index

QAbstractItemView (QtGui) (cont.)

QAction (QtGui) (cont.)

setDragEnabled(), 312, 313, 315

setToolTip(), 172

setEditTriggers(), 231

setwhatsThis(), 172

setItemDelegate(), 437,460, 463,

toggled() signal, 172,176,177

490

triggered() signal, 172,176

setModel(), 425,437,460,463,

QActionGroup (QtGui), 176

477, 490

QApplication (QtGui), 113,115, 304

setSelectionBehavior(), 231, 460,

base class, QCoreApplication

463, 495

clipboard(), 297, 311

setSelectionMode(), 231,460,463

palette(), 438,489

startDrag(), 316

setQuitOnLastWindowClosed(), 121

QAbstractScrollArea (QtGui)

QBoxLayout (QtGui), 146, 326

base class, QFrame

base class, QLayout

viewport(), 392, 393

addLayout(), 146

QAbstractSlider (QtGui)

addSpacing(), 146

base class, QWidget

addStretch(), 146

setRange(), 369

setStretchFactor(), 146

setValue(), 128,369

QBrush (QtGui), 374, 377

QAbstractSocket (QtNetwork), 521

QByteArray (QtCore), 313, 316, 358,

base class, QIODevice

359, 525, 526, 533

connectToHost(), 525

QCalendarWidget (QtGui), 575

state(), 540

QCheckBox (QtGui), 575

waitForDisconnected(), 544

QClipboard (QtGui), 297, 310-312

QAbstractSpinBox (QtGui)

base class, QObject

base class, QWidget

hasHtml(), 312

lineEdit(), 327

mimeData(), 312

setAlignment(), 340, 487

pixmap(), 311

validate(), 327,328

setImage(), 311

QAbstractTableModel (QtCore), 425,

setMimeData(), 311

427

setPixmap(), 311

base class, QAbstractItemModel

setText(), 297, 311

QAction (QtGui), 171-172,175,194,

text(), 297, 311

385

QCloseEvent (QtGui), 186

base class, QObject

QColor (QtGui), 337, 345, 371, 392,

data(), 172, 393,395

393, 438,481,489

editor, visual, 206

QComboBox (QtGui), 440, 576

isChecked(), 172,176

base class, QWidget

isEnabled(), 172

addItem(), 276

setCheckable(), 393

addItems(), 440

setChecked(), 172,177,393

currentIndexChanged() signal,

setData(), 172,189,392,393

124,275

setEnabled(), 172

currentText(), 441

setSeparator(), 172

findText(), 142,441, 457

setShortcut(), 171,172

setCurrentIndex(), 441, 457

setStatusTip(), 172

setEditable(), 440

setText(), 172

setModel(), 456

QComboBox (QtGui) (cont.)

setModelColumn(), 456 QContextMenuEvent (QtGui), 307

base class, QlnputEvent QCoreApplication (QtCore), 538 base class, QObject applicationDirPath(), 173 applicationName(), 194 exec_(), 115,184 installTranslator(), 516 notify(), 305 processEvents(), 294, 537 quit(), 115 translate(), 513, 515 QCursor (QtGui), 318

pos(), 318, 357 QDataStream (QtCore), 240-246,242, 245, 315,316,358,359,435,525, 528, 531, 533, 540 atEnd(), 245 device(), 525, 533 isOpen(), 525 readBool(),245 readDouble(), 241, 245 readIntn (), 243, 245, 360, 435 readUIntn(), 245, 528, 540 setVersion(), 241, 243,245, 525,

528, 531, 533, 540 write(), 526, 533 writeBool(), 245 writeDouble(), 241,245 writeIntn(), 241,242, 245, 359, 435

writeUIntn(),245, 525, 533 QDataWidgetMapper (QtGui), 453, 456 base class, QObject addMapping(), 453,456 currentIndex(), 454,455 setCurrentIndex(), 454,455 setItemDelegate(), 456 setModel(),453, 456 setSubmitPolicy(), 453, 456 submit(),454 toFirst(), 453,456 QDate (QtCore), 19,45, 253, 513 addDays(), 491

QDate (QtCore) (cont.) addYears(),490

currentDate(), 46,236,401, 490 isNull() ,45 toPyDate(), 532, 541 toString(), 258, 401 QDateEdit (QtGui), 487, 576

base class, QDateTimeEdit QDateTime (QtCore), 45,454, 513 currentDateTime(), 454 dateTime(), 455 isNull() ,45 setDateTime(), 454 toString(), 455 QDateTimeEdit (QtGui), 452, 576 base class, QAbstractSpinBox date(),487

setCalendarPopup(), 487 setDate(), 487 setDateRange(), 452, 487 setDisplayFormat(), 452, 487 QDesktopServices (QtGui), 510 QDial (QtGui), 128 QDialog (QtGui), 118, 154, 217 base class, QWidget accept(), 151, 154,425 done(), 154, 457, 464 exec_(), 142,154,511 reject(),215 setSizeGripEnabled(), 154 QDialogButtonBox (QtGui), 145, 150, 576

base class, QWidget accepted(), 145,150 addButton(), 150 button(), 150,158 default button, 145,188 rejected(), 145,150 QDir (QtCore) homePath(), 545

toNativeSeparators(), 547, 551 QDockWidget (QtGui), 169 base class, QWidget setAllowedAreas(), 169, 170 setFeatures(), 170 QDomDocument (QtXml), 257, 259-262 base class, QDomNode

QDomDocument (QtXml) (cont.) documentElement(), 260 setContent(), 259 toString(), 257,260 QDomElement (QtXml) base class, QDomNode attributed, 261 tagName(), 260 QDomNode(QtXml) firstChild(), 260 isNull(), 260 nextSibling(),260 nodeType(), 261 toElement(),260 toText(),261 QDoubleSpinBox (QtGui), 123, 578 base class, QAbstractSpinBox QDrag (QtGui),316 base class, QObject exec_(), 316 setHotSpot(), 316 setMimeData(), 316 setPixmap(), 316 start(), 316 QDropEvent (QtGui) base class, QEvent mimeData() (QDropEvent), 314 setDropAction(), 314, 315, 316 QEvent (QtCore)

accept(), 314, 333, 391 globalPos(), 307, 309 ignore(), 314 type(), 384 QFile (QtCore), 241,243, 250,252, 258, 259, 262 base class, QIODevice exists(), 294 QFileDialog (QtGui)

getExistingDirectory(), 547 getOpenFileName(), 193,194, 233,

234, 287, 295, 356 getSaveFileName(), 196 QFileInfo (QtCore), 189 fileName(), 189 isFile(), 294 path(),233, 356

setPointSize(), 335, 336 QFontComboBox (QtGui), 576

base class, QComboBox QFontMetrics/QFontMetricsF (QtGui), 335,336,340,341,342,390,408, 439

QFrame (QtGui), 277 base class, QWidget setFrameStyle(), 170, 278 QGraphicsItem (QtGui), 349, 364, 365, 366, 367, 373, 376 boundingRect(), 365, 366, 367,

373, 377 collidesWithPath(), 366 collidingItems(), 366 contains(), 366 contextMenuEvent(), 365 isObscured(), 366 isSelected(), 366 itemChange(), 362, 366 keyPressEvent(), 365 matrix(), 359, 377 mouseDoubleClickEvent(), 362 moveBy(), 366 paint(),366, 368,374, 377 pos(), 359, 366 resetMatrix(), 366 rotate(), 360, 366, 371, 375, 377 scale(), 366 scene(), 366, 375 sceneBoundingRect(), 366, 379 setCursor(), 366 setEnabled(), 366 setFlag(), 366

setFlags(), 351, 356, 362, 364 setFocus(), 364, 366 setFont(), 362

setMatrix(), 362, 364, 367, 377 setPos(), 356, 362, 364, 367, 373, 375

setSelected(), 356, 362, 364, 367 setZValue(), 367 shape(), 365, 367, 374, 377 shear(), 367 translated, 367

QGraphicsItem (QtGui) (cont.) update(), 365, 367 zValue(), 367 QGraphicsLineItem (QtGui), 349

base class, QGraphicsItem QGraphicsPixmapItem (QtGui), 349, 356

base class, QGraphicsItem pixmap(), 359 QGraphicsRectItem (QtGui), 355 base class, QAbstractGraphics-ShapeItem QGraphicsScene (QtGui), 349, 354, 369 baseclass, QObject addEllipse(), 354 addItem(), 354,356, 362,364,371 addLine(), 354 addPath(), 354 addPixmap() , 354 addPolygon(), 354 addRect(), 354, 355 addText(), 354

clearSelection(), 356, 361, 362, 364

collidingItems(), 354, 375 items(), 354, 372 removeItem(), 354, 355, 359, 361, 372

render(), 354, 361 selectedItems(), 358,360,361 setBackgroundBrush(), 354 setSceneRect(), 354, 369 update(), 354 views(), 354, 362 QGraphicsSceneContextMenuEvent (Qt-Gui), 365 base class, QEvent screenPos(), 365 QGraphicsSimpleTextItem (QtGui), 349 base class, QAbstractGraphics-ShapeItem QGraphicsTextItem (QtGui), 349, 362 baseclass, QGraphicsItem font(), 359 toPlainText(), 359

QGraphicsView (QtGui), 349, 351-352, 369, 577 base class, QAbstractScrollArea mapToScene(), 357 matrix(), 370 render(), 361 scale(), 352 setDragMode(), 352 setMatrix(), 370 setRenderHint(), 352, 369 setScene(), 354, 369 QGridLayout (QtGui), 123, 144,146, 150, 270, 273 base class, QLayout addLayout(), 146,151 setColumnStretch(), 146 setRowStretch(), 146 QGroupBox (QtGui), 577 QHBoxLayout (QtGui), 144, 146, 270

base class, QBoxLayout QIcon (QtGui), 173,313,392 QImage (QtGui), 168, 195, 197, 198, 199, 329, 400 base class, QPaintDevice invertPixels(), 197 isNull(), 400 mirrored(), 198 rgbSwapped(), 197 save(), 196 scaled(), 199 size(), 363, 400 QImageReader, 193 QImageWriter, 196 QInputDialog (QtGui), 199 QInputEvent (QtGui) base class, QEvent modifiers(), 307, 365, 391 QIODevice (QtCore), 526 base class, QObject bytesAvailable(), 528,531,540 close(), 243,259, 525, 528 errorString(), 241,243,250,252,

readAll(), 254

QIODevice (QtCore) (cont.)

waitForReadyRead(), 540 QItemDelegate (QtGui), 436,437, 485-489 base class, QAbstractItemDelegate QKeyEvent (QtGui), 307 base class, QInputEvent key(), 307, 334, 365, 384, 391, 483

QKeySequence (QtGui), 171, 175, 285,

292, 393 QLabel (QtGui), 114, 168, 340, 577 base class, QFrame setAlignment(), 168, 340 setBuddy(), 143, 425 setPixmap(), 199 QLayout (QtGui), 146

base class, QLayoutItem addWidget(), 146,151,273 setSizeConstraint(), 277, 279 QLCDNumber (QtGui), 577 QLinearGradient (QtGui), 343 QLineEdit (QtGui), 117, 310, 314, 440, 461, 577 base class, QWidget inputMask property, 157 returnPressed() signal, 440 setAlignment(), 461 setInputMask(), 461 setText(), 441,462 setValidator(), 461 text(),441

textEdited() signal, 161,217, 218

QListView (QtGui), 415, 578

base class, QAbstractItemView QListWidget (QtGui), 275, 312, 315, 414,418, 578 base class, QListView addItem(), 418 clear(), 418

currentRowChanged() signal, 275 populating, 418 setCurrentItem(), 418 QListWidgetItem (QtGui), 316,418 setIcon(), 316

QListWidgetItem (QtGui) (cont.)

takeItem(), 316 QLocale (QtCore), 513, 516 .qm (Qt message file), 516, 518 QMainWindow (QtGui), 168,186,284, 290

base class, QWidget addDockWidget(), 169,186 addToolBar(), 179, 186 closeAllWindows(), 289, 293 menuBar(), 177, 186 restoreState(), 183,186 saveState(), 183,186 setCentralWidget(), 168,186,285 statusBar(), 170,186 QMatrix and QTransform (QtGui), 356 reset(), 370, 377 scale(), 370 QMdiArea (QtGui), 290 QMenu (QtGui), 307, 365, 392, 393 base class, QWidget aboutToShow() signal, 178,187,

addSeparator(), 178,180,307 exec_(), 307, 365, 392, 393 QMenuBar (QtGui), 177,178 QMessageBox (QtGui), 153, 187, 188,

200,361, 423,455 QMetaObject (QtCore), 217

connectSlotsByName(), 217 QMimeData (QtCore), 311, 313, 316 base class, QObject data(),315,316 hasFormat(), 314, 316 html(), 312 setData(), 316 setHtml(), 311 QModelIndex (QtCore), 414,432, 504 column(), 428,431, 439, 461,462, 486, 496, 503 index(), 427 internalPointer(), 504 isValid(), 427, 428, 504 model(), 438, 441,462, 489 row(), 427,491

QModelIndex (QtCore) (cont.)

sibling(), 491 QMouseEvent (QtGui), 309 base class, QInputEvent button(), 333 pos(), 309 QMutex (QtCore), 541, 552, 553, 554 QMutexLocker (QtCore), 554 QObject (QtCore), 119,127, 304, 322, 370

blockSignals(), 135 connect(), 124,130,133,145,146,

151,158, 453 deleteLater(), 287, 531, 539, 544 destroyed() signal, 286, 288 disconnect(), 130 emit(), 130,131,219, 333, 340,

391,431, 440, 556 event(), 304, 309, 310, 384 installEventFilter(), 304 parent(),433, 504 properties, 157, 211 property(), 322, 324 sender(), 135, 289, 393, 395,440 setObjectName(), 169,183, 324 setProperty(), 322, 324 startTimer(), 370 timerEvent(), 372 tr(), 513, 514, 515 trUtf8(), 513 QPainter (QtGui), 306, 328, 337, 342, 343,344,361,363,400,407-410, 408, 480 drawArc(), 344 drawChord(), 344 drawConvexPolygon(), 344 drawEllipse(), 344, 374, 377,481 drawImage(), 344, 363,400 drawLine(), 338, 344 drawPath(), 344, 377 drawPicture(), 363 drawPie(), 344 drawPixmap() , 344, 363, 408 drawPoint(), 344 drawPolygon(), 338, 343, 344, 345 drawPolyline(), 344, 345

QPainter (QtGui) (cont.)

drawRect(), 337, 344, 368,410 drawRoundRect(), 344 drawText(), 306, 338, 344,408, 410,481 fillPath(), 344 fillRect(), 344,438,481, 489 restore(),343, 346,410,438,482, 489

rotated, 343

saved, 343, 346, 438, 481,489 scaled, 343

374,377,409,410,481 setRenderHint(), 306, 337, 342,

343, 363 setViewport(), 329, 342, 343, 363 setWindow(), 329, 342, 343, 363 shear(), 343

translated, 343, 438, 489 viewport(), 363,400 QPainterPath (QtGui), 374, 376 addEllipse(), 374, 376 addPolygon(), 376 boundingRect(), 377 closeSubPath(), 376 QPaintEvent (QtGui), 480 base class, QEvent rect(),480 QPalette (QtGui), 337,481 QPen (QtGui), 368 setColor(), 368 setWidth(), 368 QPicture (QtGui), 329

base class, QPaintDevice QPixmap (QtGui), 199, 329, 392, 404, 408, 496 base class, QPaintDevice fill(), 392 fromImage(), 199 isNull(), 496

QPoint/QPointF (QtCore), 309, 338, 343, 371

QPolygon/QPolygonF (QtGui), 343, 345, 376

QPrintDialog (QtGui), 361, 363,400,

403, 404, 408 QPrinter (QtGui), 170, 329, 353, 361, 363, 398, 400,401 base class, QPaintDevice newPage(), 410 pageRect(), 408 setPageSize(), 353, 398,400 QProcess (QtCore), 537 QProgressBar (QtGui), 578 QPushButton (QtGui), 276, 278, 369, 578

base class, QAbstractButton clicked() signal, 219 default button, 145,188 see also QDialogButtonBox QRadioButton (QtGui), 577 .qrc (PyQt resource file), 173,207, 517

QReadWriteLock (QtCore), 540, 541, 545, 552 lockForRead(), 541, 542, 543, 548,

550,551, 556 lockForWrite(), 542, 543, 556 unlock(), 541, 542, 543, 548, 550, 551, 556

QRect/QRectF (QtCore), 355, 357, 364, 376,410 adjusted(),355,367 center(), 392, 393 contains(), 357 setBottom(), 365 setRight(), 365 size(), 400 QRegExp (QtCore), 327, 386, 387,461 QRegExpValidator (QtGui), 157, 327, 461

QScintilla add-on, 381, 382 QScrollArea (QtGui), 476, 477, 479 QSettings (QtCore), 182-183,228, 282,293,514 base class, QObject

QSettings (QtCore) (cont.) IniFormat constant, 228 value(), 183 QSignalMapper (QtCore), 292, 297-300 QSize (QtCore), 183, 335, 341, 390, 400, 439, 489 scale(), 363,400 QSlider (QtGui), 369, 578

base class, QAbstractSlider QSpacerItem (QtGui), 212

base class, QLayoutItem QSpinBox (QtGui), 180, 326, 340, 440, 578

base class, QAbstractSpinBox setRange(), 180, 340, 440 setSingleStep(), 440 setSuffix(), 180, 340 setValue(), 128, 180, 340, 441 textFromValue(), 327, 328 value(), 441

valueChanged(), 124, 128, 199 valueFromText(), 327, 328 QSplitter (QtGui), 280-283,477 base class, QFrame restoreState(), 282 saveState(),282 setStretchFactor(), 283 QSqlDatabase (QtSql), 446 addDatabase(), 446,459 commit(),449,465,468,469 database(), 465,468,469 driver(),449

lastError(), 446,450,459,465 open(),446,459 rollback(), 449, 465,469 setDatabaseName(), 446, 459 transaction(), 449,465,468,469 QSqlDriver (QtSql), 449 base class, QObject hasFeature(), 449 QSqlQuery (QtSql), 445, 446-451, 450, 464, 468, 469 addBindValue(), 448,450 bindValue(), 448,450,468 boundValue(), 450 driver(),450

QSqlQuery (QtSql) (cont.)

exec_(), 447,448, 449, 450, 464, 468, 469 first(), 450 isActive(), 449,450 isValid(), 450 last(), 450 lastError(), 449 next(), 449,450,451, 468, 469 numRowsAffected(), 449, 450 prepare(), 448, 450,468 previous(),449,450 record(),450 seek(), 449,451 setForwardOnly(), 451 size(), 450 value(), 449, 450, 451 QSqlQueryModel (QtSql)

base class, QAbstractTableModel record(), 464, 465, 466, 469 setQuery(), 464 QSqlRecord (QtSql)

value(), 464,465,466,469 QSqlRelation (QtSql), 456, 460, 462 QSqlRelationalDelegate (QtSql), 456,

460,461 QSqlRelationalTableModel (QtSql), 445, 456, 462 base class, QSqlTableModel relationModel(),456 setRelation(), 456,460,462 QSqlTableModel (QtSql), 445, 453 base class, QSqlQueryModel beforeInsert(), 470 fieldIndex(), 456 insertRecord(), 464 select(), 453, 456, 460, 462, 464, 469

setFilter(), 464, 469 setSort(), 453,456,460,462 setTable(), 453, 456,460,462 submitAll(), 455, 466, 469 QSslSocket (QtNetwork), 521 QStackedWidget (QtGui), 274-276 base class, QFrame setCurrentIndex(), 275 QStatusBar (QtGui)

QStatusBar (QtGui) (cont.) base class, QWidget clearMessage(), 170,232 setSizeGripEnabled(), 170 showMessage(), 170,233 QString (QtCore), 19,23, 28, 233,234, 256,313,402 arg(), 402,418,419,423,427,428, 455,513,515 compare(), 435 contains(),234 endsWith(), 240 indexOf(), 306, 387, 388 isEmpty(), 233 isNull() ,45 lastIndexOf(),234 left(),234, 306 length(), 388

localeAwareCompare(), 416,434 mid(),252 number(), 338 simplified(), 61, 422 split(), 253 startsWith(), 252 toInt(), 251,422 toUpper(), 327 trimmed(), 252, 422 see also str type and unicode type

QStringList (QtCore), 45,189 contains(), 189 isNull() ,45 prepend(), 189 takeLast(), 189 QStyleOptionGraphicsItem (QtGui), 374

QStyleOptionViewItem (QtGui), 438,

439,461 QSvgGenerator (QtGui), 329, 363

base class, QPaintDevice QSvgRenderer (QtSvg), 363 QSyntaxHighlighter (QtGui), 386-389 Qt namespace, 258

escape(),258, 397,401 WindowStaysOnTopHint, 529 Qt Assistant application, 510

Qt Designer application, 205-216, 272, 274, 275, 276, 277, 280, 324, 326, 333 Qt.ItemDataRole (QtGui), 231 Qt Linguist application, 513 Qt.WidgetAttribute (QtGui)

WA_DeleteOnClose, 156,158,284, 286

WA_GroupLeader, 511 QTableView (QtGui), 415,425,437,458, 460, 463, 477, 490, 579 base class, QAbstractItemView horizontalHeader(), 463, 464 resizeColumnsToContents(), 232, 419,460, 463,490 setColumnHidden(), 460, 463 setSortingEnabled(), 418, 419 QTableWidget (QtGui), 230-232, 310, 313,414,418, 579 base class, QTableView clear(), 418 currentColumn(), 422 currentItem() , 422 editItem(), 422 item(), 422

itemChanged() signal, 417 populating, 418 scrollToItem(), 232 setColumnCount(), 231,418 setCurrentItem(), 232, 419 setHorizontalHeaderLabels(),

231.418 setItem(), 231,419 setRowCount(), 231,418

QTableWidgetItem (QtGui), 231-232,

418.419 data(),422 setData(), 419 setSelected(), 232,419 setTextAlignment(), 231,419 text(), 422

QTabWidget (QtGui), 272-274, 579

base class, QWidget QtCore module (PyQt4), 19 pyqtProperty(), 322 @pyqtSignature(),218,219

QtCore module (PyQt4) (cont.) PYQT_VERSION_STR variable, 200 QT_VERSION_STR variable, 200 SIGNAL(), 131 SLOT(), 131

see also under class names QTcpServer (QtNetwork), 529, 530, 539 incomingConnection(), 530, 539 listen(), 529 QTcpSocket (QtNetwork), 522, 524, 531, 540

base class, QAbstractSocket QTextBlock (QtGui), 396 QTextBlockFormat (QtGui), 404 QTextBrowser (QtGui), 117, 381, 511, 579

base class, QTextEdit QTextCharFormat (QtGui), 386, 387, 404

QTextCursor (QtGui), 297, 384, 403-407 currentFrame(), 404 hasSelection(), 385 insertBlock(), 404 insertImage(), 404 insertTable(), 404 insertText(), 384,404 removeSelectedText(), 297 selectedText(), 297 setPosition(), 406 QTextDocument (QtGui), 381, 383, 396, 398, 401-407,403,438,439, 489

base class, QObject clear(), 383

drawContents(), 438,489 idealWidth(), 390, 439,489 isEmpty(), 385 isModified(), 287, 385 print_(), 403, 407 setDefaultFont(), 438,439,489 setHtml(), 403,438, 439, 489 setModified(), 286, 383, 384 toHtml(), 407 QTextEdit (QtGui), 285, 310, 381, 383, 390, 392, 579

QTextEdit (QtGui) (cont.)

base class, QAbstractScrollArea append(), 120 canPaste(), 385 currentCharFormat(), 393, 395 cursorRect(), 392, 393 cut(), 385

385, 396 ensureCursorVisible(), 392, 393 insertPlainText(), 297 mergeCurrentCharFormat(), 395 setHtml(), 488 setLineWrapMode(), 390 setPlainText(), 384 setTabChangesFocus(), 390 setTextColor(), 393 textCursor(), 297, 384, 385 toHtml(), 395 toPlainText(), 384, 395 QTextOption (QtGui), 409 QTextStream (QtCore), 250-255,254, 258, 384 atEnd(), 252,253, 254 readAll(), 384 readLine(), 252,253, 254 setCodec(), 250,252,254, 258, 384

QTextTableFormat (QtGui), 404 QtGui module (PyQt4), 19

see also under class names QThread (QtCore), 538, 540 isRunning(), 547, 551 run(), 538, 540, 548, 553 start(), 539, 547, 553 wait(), 547, 548, 551 QTime (QtCore),45 isNull() ,45 see also time module QTimeEdit (QtGui), 576

base class, QDateTimeEdit QTimer (QtCore), 373, 376 base class, QObject singleShot(), 115,306 start(), 373, 376 timeout() signal, 373, 376

QtNetwork module (PyQt4), 521, 523

see also under class names QToolBar (QtGui), 179-180,180 base class, QWidget addSeparator(), 178,180 QToolTip (QtGui), 171, 200, 514 QTransform (QtGui), 356 QTranslator (QtCore), 516 QTreeView (QtGui), 415, 495, 579 base class, QAbstractItemView populating, 502 setItemsExpandable(), 420 setUniformRowHeights(), 495 QTreeWidget (QtGui), 414, 579 base class, QTreeView clear(), 420 expandItem(), 421 populating, 420 setColumnCount(), 420 setCurrentItem(), 421 setHeaderLabels(), 420 QTreeWidgetItem (QtGui), 420,421 QtSql module (PyQt4), 445, 446 see also under class names QtSvg module (PyQt4), 363

see also under class names QT_VERSION_STR variable, 200 QtXml module (PyQt4), 235

see also under class names QUdpSocket (QtNetwork), 522

base class, QAbstractSocket queries, database; see QSqlQuery and

SQL statements question() (QMessageBox), 187, 188,

361, 423,455 quit() (QCoreApplication), 115 quitting applications; see terminating applications quoted strings; see string literals QVariant (QtCore), 183,185,231, 323, 392,414,427,428,429,430,441, 448,451, 488, 496 toBool(), 324 toDate(), 487,491 toDateTime(), 449 toDouble(), 481

QVariant (QtCore) (cont.) toInt(), 395,431, 449 toLongLong(), 422 toString(), 427,431, 441, 449, 488

QVBoxLayout (QtGui), 146, 270

base class, QBoxLayout QWidget (QtGui), 118, 119, 127, 168, 273,305,306,309,322-324,324, 325-326,328,329,330,331,370, 421

base classes, QObject and QPaint-Device activateWindow(), 160,289 addAction(), 172, 178, 180,307,

330, 365, 392, 393 addActions(), 178 close(), 175,285,289,330 closeEvent(), 175,185,187, 282, 285,289,293,309, 551 contextMenuEvent(), 307, 309, 390 dragEnterEvent(), 309, 314, 316 dragMoveEvent(), 309, 314, 315, 316

dropEvent(), 309, 315, 316 font(), 336, 342 geometry(), 357 hasFocus(), 330,426 hasMouseTracking(), 308 height(), 330 hide(), 279, 330 keyPressEvent(), 307, 309, 334, 391, 483 keyReleaseEvent(), 307 layout(),277 mapFromGlobal(), 357 mapToGlobal(), 309, 392, 393 maximumHeight(), 390 minimumHeight(), 390 minimumSizeHintO, 271, 335, 340,

341, 479 mouseDoubleClickEvent(), 308,

309,417,422,440 mouseMoveEvent(), 309,317 mousePressEvent(), 309, 333 mouseReleaseEvent(), 308, 309

QWidget (QtGui) (cont.) move(), 183, 330, 341 paintEvent(), 306, 309, 336, 342, 480 palette(), 337 raise_(), 160,289, 330 rect(), 306, 330 resize(), 183

resizeEvent(), 306, 309, 341 restoreGeometry(), 183,186,330 saveGeometry(), 183,186,330 setAcceptDrops(), 312, 313, 314,

315,316,330 setAttribute(), 156,284, 330, 511

setContextMenuPolicy(), 168,330, 365

setCursor(), 330 setEnabled(), 219, 330 setFocus(), 120,310,330, 422 setFocusPolicy(), 180,217, 331,

369, 478 setFont(), 330 setLayout(),273, 279,330 setMaximumHeight(), 390 setMinimumHeight(), 390 setMinimumSize(), 168, 340 setMinimumWidth(), 340 setMouseTracking(), 308, 334 setSizePolicy(), 330, 331, 340 setStatusTip(), 171,180 setStyleSheet(), 323, 330 setTabOrder(), 206 setToolTip(), 171,180,390 setVisible(), 277, 280 setWindowFlags(), 529 setWindowIcon(), 186,330 setWindowModified(), 192 setWindowTitle(), 146,151,186,

showMinimized(), 297 showNormal(), 297 sizeHint(), 335, 390,479 update(), 306, 330, 332,479,482

updateGeometry(), 330, 332, 479 wheelEvent(), 352 width(), 330 QWorkspace (QtGui), 290,297 base class, QWidget activeWindow(), 296 setActiveWindow(), 292,295 windowList(), 295 QXmlContentHandler(QtXml) characters(), 263 endElement(), 263 startElement(), 263 QXmlDefaultHandler (QtXml), 263

base class, QXmlContentHandler QXmlErrorHandler (QtXml)

fatalError(), 263 QXmlInputSource (QtXml), 262 QXmlReader (QtXml) parse(), 262

setContentHandler(), 262 setErrorHandler(), 262 QXmlSimpleReader (QtXml), 262-265

base class, QXmlReader gzip module, 248

0 0

Post a comment