Code Monkey home page Code Monkey logo

pyqt5-custom-widgets's Introduction

PyQt5 Custom Widgets drawing

More useful and stylish widgets for PyQt5 such as toggle switches, animated buttons, etc..

Table of Contents

Installing

Install using PIP (it might be pip3 or python3 depending on your platform)

pip install pyqt5Custom

or

python -m pip install pyqt5Custom

Also you can also use PySide2 instead of PyQt5 with just litte changes.

Usage

Just import pyqt5Custom and you're ready to go. You can check out Examples, one little example for StyledButton widget:

from pyqt5Custom import StyledButton

...

btn = StyledButton(text="Hello!")
btn.setStyleDict({
    "border-radius" : 20,
    "font-family" : "Helvetica",
    "font-size" : 17
  })

@btn.clicked.connect
def slot():
  print("Quitting!")
  app.exit()

layout.addWidget(btn)

...

Widgets

ToggleSwitch
ToggleSwitch
Documentation
StyledButton
StyledButton
Documentation
ImageBox
ImageBox
Documentation
ColorPicker
ColorPicker
Documentation
DragDropFile
DragDropFile
Documentation
EmbedWindow
EmbedWindow
Documentation
CodeTextEdit
CodeTextEdit
Documentation
TitleBar
TitleBar
Documentation
Spinner
Spinner
Documentation
Toast
Toast
Documentation

References

Dependencies

TODO

  • Better styling and QSS support
  • Rework animations using Qt's animation framework
  • Optimize and complete ColorPicker widget

License

GPL v3 © Kadir Aksoy

pyqt5-custom-widgets's People

Contributors

kadir014 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyqt5-custom-widgets's Issues

[Bug] Timeout for Toast does not work

As stated, when calling toast.rise() it will not pay attention to the int placed on it and it will just be up indefinitely, I bypassed this by making another thread on a timer that will call for it to lower, though perhaps I just have a fundamental misunderstanding of how it works.
Also, I would love the ability to change the icon for the Toast while it's risen, so, for instance, I'm able to place a check icon to let the user know that a certain operation is over, currently toast.setIcon() doesn't allow me to do this :)

Event for custom toggle state change?

I am trying to figure out how to perform a certain action only when a slider is turned on. I looked at the class definition but I was not able to figure out how to listen for events on that object. Could you offer some input on this?

[Bug] DragDropFile doesn't work when run from Admin

I love your library, but when I tried to implement it to one of my projects that requires admin privileges it just refused to accept anything, when not elevated it will work just fine.
I would love to see this library improve further, keep up the good work!

help me float error

C:\Users\umutd\Desktop\pyqt5-custom-widgets-1.0.1\examples>example_requesthandler.py
Traceback (most recent call last):
File "C:\Users\umutd\Desktop\pyqt5-custom-widgets-1.0.1\examples\pyqt5Custom\styledbutton.py", line 276, in paintEvent
else: fc = self.anim_hover.lerp(fc1, fc2)
File "C:\Users\umutd\Desktop\pyqt5-custom-widgets-1.0.1\examples\pyqt5Custom\animation.py", line 102, in lerp
return QColor(r, g, _b, _a)
TypeError: arguments did not match any overloaded call:
QColor(color: Qt.GlobalColor): argument 1 has unexpected type 'float'
QColor(rgb: int): argument 1 has unexpected type 'float'
QColor(rgba64: QRgba64): argument 1 has unexpected type 'float'
QColor(variant: Any): too many arguments
QColor(): too many arguments
QColor(r: int, g: int, b: int, alpha: int = 255): argument 1 has unexpected type 'float'
QColor(aname: str): argument 1 has unexpected type 'float'
QColor(acolor: Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'float'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.