Differences between revisions 5 and 6
Revision 5 as of 2014-11-16 23:50:53
Size: 10713
Editor: bugreporter
Comment: Adding link to PyQt5 example: QML callback functions.
Revision 6 as of 2019-08-06 22:59:05
Size: 10848
Editor: DavidBoddie
Comment: Reversed the order of versions, added a placeholder PyQt5 example.
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
== PyQt 3 ==
''Note: PyQt 3 examples have not been transferred from the old !PyQt Wiki.''
== PyQt 5 ==
Line 10: Line 9:
 * CustomListViewItems: How to customize the painting of list view items. (Qt 3)
 * ListBoxAndListViewIterators: How to loop over all items in list boxes and list views. (Qt 3)
 * DragAndDropWithPyQt: How to make use of drag and drop without subclassing. (Qt 3)
 * CreatingMdiApplications: Some links and pointers for MDI development. (Qt 3)
 * [[Wrapper_For_QWidgetFactory]]: How to set up the slot connections automatically in PyQt. (Qt 3)
 * [[LoadingUIFilesAtRuntime]]: How to load classes (as opposed to instances) directly from UI files, at runtime. (Qt 3)
 * [[SimpleQScintillaExample]]: a simple demonstration of QScintilla use with PyQt. (Qt 3)
 * SignalDecorator: a decorator that provides the signal signature for a method. (Qt 3)
 * ScrollableGroupBox: A simple way to get a scrollable groupbox. (Qt 3)
 * [[Capturing_Output_from_a_Process]]: How to capture output from a process and show it in a text editor/browser. (Qt 3)
 * [[Printing_a_Worksheet]]: How to print the contents of a worksheet onto a single page of A4 paper. (Qt 3)
 * [[PyQt/QML callback function|QML callback function]]: How to pass and execute callback functions with QML.
 * [[PyQt5/Threading,_Signals_and_Slots|Threading, Signals and Slots]]: How to perform work in one thread and use the result in another.
Line 28: Line 18:
 * [[PyQt/Threading,_Signals_and_Slots|Threading,_Signals_and_Slots]]: How to perform work in one thread and use the result in another. (Qt 4)  * [[PyQt/Threading,_Signals_and_Slots|Threading, Signals and Slots]]: How to perform work in one thread and use the result in another. (Qt 4)
Line 102: Line 92:
== PyQt 5 ==
 * [[PyQt/QML callback function|QML callback function]]: How to pass and execute callback functions with QML.
== PyQt 3 ==
''Note: PyQt 3 examples were not transferred from the old !PyQt Wiki.''

 * CustomListViewItems: How to customize the painting of list view items. (Qt 3)
 * ListBoxAndListViewIterators: How to loop over all items in list boxes and list views. (Qt 3)
 * DragAndDropWithPyQt: How to make use of drag and drop without subclassing. (Qt 3)
 * CreatingMdiApplications: Some links and pointers for MDI development. (Qt 3)
 * [[Wrapper_For_QWidgetFactory]]: How to set up the slot connections automatically in PyQt. (Qt 3)
 * [[LoadingUIFilesAtRuntime]]: How to load classes (as opposed to instances) directly from UI files, at runtime. (Qt 3)
 * [[SimpleQScintillaExample]]: a simple demonstration of QScintilla use with PyQt. (Qt 3)
 * SignalDecorator: a decorator that provides the signal signature for a method. (Qt 3)
 * ScrollableGroupBox: A simple way to get a scrollable groupbox. (Qt 3)
 * [[Capturing_Output_from_a_Process]]: How to capture output from a process and show it in a text editor/browser. (Qt 3)
 * [[Printing_a_Worksheet]]: How to print the contents of a worksheet onto a single page of A4 paper. (Qt 3)

This page contains links to some useful code snippets. Longer, more detailed code examples can be found via the Overviews_and_Guides page.

Put any code snippet for PyKDE and PyQt that you find useful here. If the code is longer than one screen at normal point size, it might be better if you provide a rationale and a link, or just put it on a separate page.

PyQt 5

PyQt 4

Infrastructure

Painting

Widgets

Item Views

WebKit

Multimedia

Drag and Drop

Databases

  • Removing a database: How to remove a database and optionally reload it again without getting warnings from Qt.

Qt Designer and uic

PyQt 3

Note: PyQt 3 examples were not transferred from the old PyQt Wiki.

PyQt/SampleCode (last edited 2019-08-06 22:59:05 by DavidBoddie)

Unable to edit the page? See the FrontPage for instructions.