Features¶
This library provides several classes.
- QPythonPlainTextEdit - actual code editor class. Extends QPlainTextEdit.
- QPythonPlainTextWidget - QWidget container that holds editor class and bottom info panel. This is a primary class for embedding editor into your application.
- QPythonPlainTextSettings - QWidget panel that displays commonly modifiable editor settings.
- QPythonPlainTextSettingsDialog - Immediately usable settings dialog if you wish to use default settings widget.
Below we outline features of the above classes .
QPythonPlainTextEdit¶
- Python syntax highlighting
- Line numbers column
- Color schemes:
"Light","Light [Bold]"and"Warm Neon" - Common code editor key combinations:
Tab- indent blockShift+Tab- unindent blockCtrl+A- select allCtrl+X- cut line or selected block and save it into clipboardCtrl+C- copy line or selected block into clipboardCtrl+V- paste text from clipboardCtrl+Z- undoCtrl+R- redoCtrl+Y- delete current line or all lines in a blockCtrl+G- goto line and optionally columnCtrl+Shift+⬆- move current line upCtrl+Shift+⬇- move current line downCtrl+D- duplicate current lineCtrl+/- toggle commenting current line or a blockCtrl+Shift+J- join current and next line- Selecting text and pressing
",',[,(,{or backtick will wrap selected text into relevant characters. Ctrl+F- search- Arrows
⬆and⬇to go to previous and next matches. Alt+C- to toggle case (in)sensitive search.Ctrl+Enter- to close search and move focus to the editor
- Arrows
QPythonPlainTextSettings¶
These allow you to modify following settings.
- Color scheme
- If syntax highlighting is enabled or not
- Show line numbers column or not
- Number of spaces to be used instead of
Tab - Fixed font family and size