You can check out showcase.py
in the Examples to see a clear demonstration of all widgets.
Here is the list of currently implemented widgets
- ToggleSwitch
- StyledButton
- ImageBox
- ColorPicker
- DragDropFile
- EmbedWindow
- CodeTextEdit
- TitleBar
- Spinner
- Toast
Other stuff that the the library provides but are not mainly widgets. Some are tools, data classes, etc...
ToggleSwitch
is simply a modern looking checkbox. It has 3 styles named win10, ios and android.
text
(str) : Text that is shown next to the switchstyle
(str) : Style of the widget. "win10", "ios" or "android"on
(bool) : Whether the switch is toggled or not
isToggled()
(bool) : Returns switch's state
toggled
: This signal is emitted when switch's state gets changed
StyledButton
is an animated push button. It has two styles named flat and hyper.
text
(str) : Text that is shown inside the buttonstyle
(str) : Style of the widget. "flat" or "hyper"icon
(str) : Filepath for the icon. This parameter is optionalfixedBottom
(bool) : Is hyper styled button's bottom fixed or not. This parameter is optional
setIcon(filepath)
: Changes button's iconsetDropShadow(bool)
: Enables or disables button's drop shadow effect
ImageBox
is a container for images or animated GIFs
source
(str) : Filepath or URL of the source image/gifkeepAspectRatio
(bool) : Protect aspect ratio. This parameter is optionalsmoothScale
(bool) : Transform the image smoothly. This parameter is optional
setIcon(filepath)
: Changes button's icon
ColorPicker
is not completed yet
DragDropFile
is an area to let user simply drop files onto it instead of browsing it on file dialog
fileDropped(file)
FileDetails : This signal is emitted when a file is dropped on widget
EmbedWindow
is a dialog window which is not a popup, it is embedded onto the parent widget
parent
(QWidget) : Parent widget of the window
content
(QLayout) : Window's layout where you can add your own widgets
setTitle(title)
: Change title of the windowsetControlsVisible(bool)
: Change visibility of control buttons
CodeTextEdit
is simply a code editor. It's a multiline text area with syntax highlighting, it only supports few languages for now. For details see SyntaxHighlighter
setTheme(theme)
: Change syntax coloring themesetLang(lang)
: Change language syntaxloadFile(filepath)
: Load file content into editor
TitleBar
lets the developer use a custom window title bar, this widget also provides window resizing controls (WIP)
parent
(QWidget) : Parent widget of the windowtitle
(str) : Title of the window (Optional)
closeButton
(StyledButton) : Close buttonmaxButton
(StyledButton) : Maximize buttonminButton
(StyledButton) : Minimize button
setTitle(title)
: Change titletitle()
(str) : Get title
Spinner
is just a visual widget that has a spinning circle on it. You can use this as icon
parameter on widgets that has icons
width
(float) : Width of the circlecolor
(QColor) : Color of the circle
Toast
is notification widget that appears at the bottom of the window.
parent
(QWidget) : Parent widgettext
(str) : Text of the widget (Optional)icon
(str/Spinner) : Icon of the widget (Optional)closeButton
(bool) : Whether to show the close button or not
rise(duration: int)
: Shows the toast notification for duration secondsfall()
: Hides the toast notification
Other stuff that the the library provides but are not mainly widgets. Some are tools, data classes, etc...
RequestHandler
is a thread (QThread) that can be used to handle HTTP requests while avoiding blocking Qt's event loop. You can see Examples to see usage of this class.
newRequest(method, url, headers, data)
method
(str) : Request methodurl
(str) : Address where request will be sent atheaders
(dict) : Request headersdata
(dict) : Request data
requestResponded
: Emitted when a requeest in the current pool gets responded. Response is a requests.Response object
FileDetails
object is a data class which is meant to be used by DragDropFile
for fileDropped
signal
path
(str) : File's pathcontent
(str) : Content of the filename
(str) : File's namepureName
(str) : File's name without the extensionextension
(str) : File's extension
Animation
is just a static class holding easing animation functions. This class is most likely going to be deprecated when I rework animations.
AnimationHandler
animates widget's properties using Animation
class's functions. This class is most likely going to be deprecated when I rework animations.
ColorPreview
is a widget to display some color. It can bee seen used next to ColorPicker example. But this widget is most likely going to be deprecated
SyntaxHighlighter
inherits QSyntaxHighlighter
, it's only purpose is to serve CodeTextEdit
widget. pyqt5Custom
module currently supports only Python and C++ syntax highlighting.