Rapid GUI programming with Python and Qt: the definitive guide to PyQt programming
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Upper Saddle River, NJ
Prentice Hall
2009
|
Ausgabe: | 3. print. |
Schriftenreihe: | Prentice Hall open source software development series
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | Includes index. Includes bibliographical references and index |
Beschreibung: | XIV, 625 S. Ill. 24 cm |
ISBN: | 9780132354189 0132354187 0134393333 9780134393339 |
Internformat
MARC
LEADER | 00000nam a2200000zc 4500 | ||
---|---|---|---|
001 | BV036044031 | ||
003 | DE-604 | ||
005 | 20160204 | ||
007 | t | ||
008 | 100222s2009 xxua||| |||| 00||| eng d | ||
020 | |a 9780132354189 |9 978-0-13-235418-9 | ||
020 | |a 0132354187 |9 0-13-235418-7 | ||
020 | |a 0134393333 |9 0-13-439333-3 | ||
020 | |a 9780134393339 |9 978-0-13-439333-9 | ||
035 | |a (OCoLC)608575043 | ||
035 | |a (DE-599)BVBBV036044031 | ||
040 | |a DE-604 |b ger |e aacr | ||
041 | 0 | |a eng | |
044 | |a xxu |c US | ||
049 | |a DE-703 |a DE-83 |a DE-91G | ||
050 | 0 | |a QA76.9.U83 | |
082 | 0 | |a 005.1/2 | |
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a ST 281 |0 (DE-625)143646: |2 rvk | ||
084 | |a DAT 754f |2 stub | ||
084 | |a DAT 366f |2 stub | ||
100 | 1 | |a Summerfield, Mark |e Verfasser |0 (DE-588)132421844 |4 aut | |
245 | 1 | 0 | |a Rapid GUI programming with Python and Qt |b the definitive guide to PyQt programming |c Mark Summerfield |
250 | |a 3. print. | ||
264 | 1 | |a Upper Saddle River, NJ |b Prentice Hall |c 2009 | |
300 | |a XIV, 625 S. |b Ill. |c 24 cm | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a Prentice Hall open source software development series | |
500 | |a Includes index. | ||
500 | |a Includes bibliographical references and index | ||
630 | 0 | 4 | |a Qt (Electronic resource) |
650 | 4 | |a Graphical user interfaces (Computer systems) | |
650 | 4 | |a Python (Computer program language) | |
650 | 0 | 7 | |a Graphische Benutzeroberfläche |0 (DE-588)4275084-2 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Python |g Programmiersprache |0 (DE-588)4434275-5 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Qt |g Software |0 (DE-588)4544202-2 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Python |g Programmiersprache |0 (DE-588)4434275-5 |D s |
689 | 0 | 1 | |a Qt |g Software |0 (DE-588)4544202-2 |D s |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Graphische Benutzeroberfläche |0 (DE-588)4275084-2 |D s |
689 | 1 | |5 DE-604 | |
856 | 4 | 2 | |m Digitalisierung UB Bayreuth |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018935832&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-018935832 |
Datensatz im Suchindex
_version_ | 1804141077667512320 |
---|---|
adam_text | Contents
Foreword
......................................................... xiii
Introduction
...................................................... 1
Part I: Python Programming
Chapter
1.
Data Types and Data Structures
..................... 9
Executing Python Code
......................................... 10
Variables and Objects
........................................... 12
Numbers and Strings
........................................... 15
Integers and Long Integers
................................. 16
Floats and Decimals
........................................ 17
Bytestrings, Unicode Strings, and QStrings
.................. 20
Collections
..................................................... 29
Tuples
..................................................... 29
Lists
....................................................... 31
Dictionaries
................................................ 35
Sets
....................................................... 37
Built-in Functions
.............................................. 37
Summary
...................................................... 41
Exercises
...................................................... 42
Chapter
2.
Control Structures
................................... 45
Conditional Branching
.......................................... 46
Looping
........................................................ 49
List Comprehensions and Generators
....................... 53
Functions
...................................................... 55
Generator Functions
....................................... 58
Using Keyword Arguments
................................. 59
Lambda Functions
......................................... 61
Dynamic Function Creation
................................ 62
Partial Function Application
................................ 63
Exception Handling
............................................ 66
vn
Summary
...................................................... 72
Exercises
...................................................... 72
Chapter
3.
Classes and Modules
................................. 75
Creating Instances
............................................. 77
Methods and Special Methods
................................... 79
Static Data, and Static Methods and Decorators
............. 85
Example: The Length Class
................................. 86
Collection Classes
.......................................... 92
Example: The OrderedDict Class
............................ 92
Inheritance and Polymorphism
.................................. 99
Modules and Multifile Applications
.............................. 104
Using the doctest Module
................................... 105
Summary
...................................................... 107
Exercises
...................................................... 108
Part
П:
Basic GUI Programming
Chapter
4.
Introduction to GUI Programming
..................
Ill
A Pop-Up Alert in
25
Lines
...................................... 112
An Expression
Evaluator
in
30
Lines
............................ 116
A Currency Converter in
70
Lines
............................... 121
Signals and Slots
............................................... 127
Summary
...................................................... 136
Exercise
....................................................... 137
Chapter
5.
Dialogs
............................................... 139
Dumb Dialogs
..............................................___ 141
Standard Dialogs
............................................... 147
Modal OK/Cancel-Style Dialogs
............................. 148
Smart Dialogs
.................................................. 154
Modeless Apply/Close-Style Dialogs
......................... 155
Modeless Live Dialogs
.................................... 159
Summary
...................................................... 162
Exercise
....................................................... 163
Chapter
6.
Main Windows
........................................ 165
Creating a Main Window
....................................... 166
Actions and Key Sequences
................................. 171
Resource Files
............................................. 172
vm
Creating and Using Actions
................................. 174
Restoring and Saving the Main Window s State
.............. 181
Handling User Actions
......................................... 190
Handling File Actions
...................................... 191
Handling Edit Actions
...................................... 197
Handling Help Actions
..................................... 200
Summary
...................................................... 201
Exercise
....................................................... 202
Chapter
7.
Using Qt Designer
.................................... 205
Designing User Interfaces
...................................... 208
Implementing Dialogs
.......................................... 216
Testing Dialogs
................................................. 221
Summary
...................................................... 223
Exercise
....................................................... 224
Chapter
8.
Data Handling and Custom File Formats
............ 227
Main Window Responsibilities
.................................. 229
Data Container Responsibilities
................................. 235
Saving and Loading Binary Files
................................ 240
Writing and Reading Using QDataStream
................... 240
Writing and Reading Using the pickle Module
............... 246
Saving and Loading Text Files
.................................. 249
Writing and Reading Using QTextStream
................... 250
Writing and Reading Using the codecs Module
............... 255
Saving and Loading XML Files
.................................. 256
Writing XML
.............................................. 256
Reading and Parsing XML with PyQt s DOM Classes
........ 259
Reading and Parsing XML with PyQt s SAX Classes
......... 262
Summary
...................................................... 265
Exercise
....................................................... 266
Part
Ш:
Intermediate GUI Programming
Chapter
9.
Layouts and Multiple Documents
.................... 269
Layout Policies
................................................. 270
Tab Widgets and Stacked Widgets
............................... 272
Extension Dialogs
.......................................... 276
Splitters
....................................................... 280
Single Document Interface
(SDI)
................................ 283
Multiple Document Interface
(MDI)
............................. 290
Summary......................................................
300
Exercise
....................................................... 301
Chapter
10.
Events, the Clipboard, and Drag and Drop
......... 303
The Event-Handling Mechanism
................................ 303
Reimplementing Event Handlers
................................ 305
Using the Clipboard
............................................ 310
Drag and Drop
................................................. 312
Handling Custom Data
..................................... 313
Summary
...................................................... 317
Exercise
....................................................... 318
Chapter
11.
Custom Widgets
..................................... 321
Using Widget Style Sheets
...................................... 322
Creating Composite Widgets
.................................... 325
Subclassing Built-in Widgets
.................................... 326
Subclassing QWidget
........................................... 328
Example: A Fraction Slider
................................. 331
Example: A Flow-Mixing Widget
........................... 339
Summary
...................................................... 345
Exercise
....................................................... 346
Chapter
12.
Item-Based Graphics
................................ 349
Custom and Interactive Graphics Items
......................... 351
Animation and Complex Shapes
................................. 368
Summary
...................................................... 378
Exercise
....................................................... 379
Chapter
13.
Rich Text and Printing
............................. 381
Rich Text Editing
............................................... 382
Using QSyntaxHighlighter
................................. 382
A Rich Text Line Edit
...................................... 389
Printing Documents
............................................ 398
Printing Images
............................................ 400
Printing Documents Using HTML and QTextDocument
...... 401
Printing Documents Using QTextCursor and QTextDocument
403
Printing Documents Using QPainter
........................ 407
Summary
...................................................... 411
Exercise
....................................................... 412
Chapter
14.
Model/View Programming
.......................... 413
Using the Convenience Item Widgets
............................ 415
Creating Custom Models
........................................ 423
Implementing the View Logic
............................... 424
Implementing the Custom Model
........................... 427
Creating Custom Delegates
..................................... 436
Summary
...................................................... 442
Exercise
....................................................... 443
Chapter
15.
Databases
........................................... 445
Connecting to the Database
..................................... 446
Executing SQL Queries
......................................... 446
Using Database Form Views
.................................... 451
Using Database Table Views
.................................... 457
Summary
...................................................... 470
Exercise
....................................................... 471
Part IV: Advanced GUI Programming
Chapter
16.
Advanced Model/View Programming
............... 475
Custom Views
.................................................. 476
Generic Delegates
.............................................. 483
Representing Tabular Data in Trees
............................. 492
Summary
...................................................... 505
Exercise
....................................................... 505
Chapter
17.
Online Help and Internationalization
.............. 509
Online Help
.................................................... 510
Internationalization
............................................ 512
Summary
...................................................... 519
Exercise
....................................................... 520
Chapter
18.
Networking
......................................... 521
Creating a TCP Client
.......................................... 523
Creating a TCP Server
......................................... 529
Summary
...................................................... 534
Exercise
....................................................... 534
xi
Chapter
19.
Multithreading
...................................... 537
Creating a Threaded Server
.................................... 539
Creating and Managing Secondary Threads
..................... 544
Implementing a Secondary Thread
.............................. 552
Summary
...................................................... 557
Exercise
....................................................... 558
This Is Not Quite the End
....................................... 559
Appendix A. Installing
........................................... 561
Installing on Windows
.......................................... 561
Installing on Mac OS X
......................................... 566
Installing on Linux and Unix
................................... 570
Appendix B. Selected PyQt Widgets
............................. 575
Appendix
С
Selected PyQt Class Hierarchies
................... 581
Index
.............................................................. 585
xu
|
any_adam_object | 1 |
author | Summerfield, Mark |
author_GND | (DE-588)132421844 |
author_facet | Summerfield, Mark |
author_role | aut |
author_sort | Summerfield, Mark |
author_variant | m s ms |
building | Verbundindex |
bvnumber | BV036044031 |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.9.U83 |
callnumber-search | QA76.9.U83 |
callnumber-sort | QA 276.9 U83 |
callnumber-subject | QA - Mathematics |
classification_rvk | ST 250 ST 281 |
classification_tum | DAT 754f DAT 366f |
ctrlnum | (OCoLC)608575043 (DE-599)BVBBV036044031 |
dewey-full | 005.1/2 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.1/2 |
dewey-search | 005.1/2 |
dewey-sort | 15.1 12 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
edition | 3. print. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>02218nam a2200565zc 4500</leader><controlfield tag="001">BV036044031</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20160204 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">100222s2009 xxua||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780132354189</subfield><subfield code="9">978-0-13-235418-9</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0132354187</subfield><subfield code="9">0-13-235418-7</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0134393333</subfield><subfield code="9">0-13-439333-3</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780134393339</subfield><subfield code="9">978-0-13-439333-9</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)608575043</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV036044031</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">aacr</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="044" ind1=" " ind2=" "><subfield code="a">xxu</subfield><subfield code="c">US</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-703</subfield><subfield code="a">DE-83</subfield><subfield code="a">DE-91G</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">QA76.9.U83</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.1/2</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 281</subfield><subfield code="0">(DE-625)143646:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 754f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 366f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Summerfield, Mark</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)132421844</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Rapid GUI programming with Python and Qt</subfield><subfield code="b">the definitive guide to PyQt programming</subfield><subfield code="c">Mark Summerfield</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">3. print.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Upper Saddle River, NJ</subfield><subfield code="b">Prentice Hall</subfield><subfield code="c">2009</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XIV, 625 S.</subfield><subfield code="b">Ill.</subfield><subfield code="c">24 cm</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Prentice Hall open source software development series</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Includes index.</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Includes bibliographical references and index</subfield></datafield><datafield tag="630" ind1="0" ind2="4"><subfield code="a">Qt (Electronic resource)</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Graphical user interfaces (Computer systems)</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Python (Computer program language)</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Graphische Benutzeroberfläche</subfield><subfield code="0">(DE-588)4275084-2</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Python</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4434275-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Qt</subfield><subfield code="g">Software</subfield><subfield code="0">(DE-588)4544202-2</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Python</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4434275-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Qt</subfield><subfield code="g">Software</subfield><subfield code="0">(DE-588)4544202-2</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Graphische Benutzeroberfläche</subfield><subfield code="0">(DE-588)4275084-2</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Bayreuth</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018935832&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-018935832</subfield></datafield></record></collection> |
id | DE-604.BV036044031 |
illustrated | Illustrated |
indexdate | 2024-07-09T22:10:08Z |
institution | BVB |
isbn | 9780132354189 0132354187 0134393333 9780134393339 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-018935832 |
oclc_num | 608575043 |
open_access_boolean | |
owner | DE-703 DE-83 DE-91G DE-BY-TUM |
owner_facet | DE-703 DE-83 DE-91G DE-BY-TUM |
physical | XIV, 625 S. Ill. 24 cm |
publishDate | 2009 |
publishDateSearch | 2009 |
publishDateSort | 2009 |
publisher | Prentice Hall |
record_format | marc |
series2 | Prentice Hall open source software development series |
spelling | Summerfield, Mark Verfasser (DE-588)132421844 aut Rapid GUI programming with Python and Qt the definitive guide to PyQt programming Mark Summerfield 3. print. Upper Saddle River, NJ Prentice Hall 2009 XIV, 625 S. Ill. 24 cm txt rdacontent n rdamedia nc rdacarrier Prentice Hall open source software development series Includes index. Includes bibliographical references and index Qt (Electronic resource) Graphical user interfaces (Computer systems) Python (Computer program language) Graphische Benutzeroberfläche (DE-588)4275084-2 gnd rswk-swf Python Programmiersprache (DE-588)4434275-5 gnd rswk-swf Qt Software (DE-588)4544202-2 gnd rswk-swf Python Programmiersprache (DE-588)4434275-5 s Qt Software (DE-588)4544202-2 s DE-604 Graphische Benutzeroberfläche (DE-588)4275084-2 s Digitalisierung UB Bayreuth application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018935832&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Summerfield, Mark Rapid GUI programming with Python and Qt the definitive guide to PyQt programming Qt (Electronic resource) Graphical user interfaces (Computer systems) Python (Computer program language) Graphische Benutzeroberfläche (DE-588)4275084-2 gnd Python Programmiersprache (DE-588)4434275-5 gnd Qt Software (DE-588)4544202-2 gnd |
subject_GND | (DE-588)4275084-2 (DE-588)4434275-5 (DE-588)4544202-2 |
title | Rapid GUI programming with Python and Qt the definitive guide to PyQt programming |
title_auth | Rapid GUI programming with Python and Qt the definitive guide to PyQt programming |
title_exact_search | Rapid GUI programming with Python and Qt the definitive guide to PyQt programming |
title_full | Rapid GUI programming with Python and Qt the definitive guide to PyQt programming Mark Summerfield |
title_fullStr | Rapid GUI programming with Python and Qt the definitive guide to PyQt programming Mark Summerfield |
title_full_unstemmed | Rapid GUI programming with Python and Qt the definitive guide to PyQt programming Mark Summerfield |
title_short | Rapid GUI programming with Python and Qt |
title_sort | rapid gui programming with python and qt the definitive guide to pyqt programming |
title_sub | the definitive guide to PyQt programming |
topic | Qt (Electronic resource) Graphical user interfaces (Computer systems) Python (Computer program language) Graphische Benutzeroberfläche (DE-588)4275084-2 gnd Python Programmiersprache (DE-588)4434275-5 gnd Qt Software (DE-588)4544202-2 gnd |
topic_facet | Qt (Electronic resource) Graphical user interfaces (Computer systems) Python (Computer program language) Graphische Benutzeroberfläche Python Programmiersprache Qt Software |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018935832&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT summerfieldmark rapidguiprogrammingwithpythonandqtthedefinitiveguidetopyqtprogramming |