TUTORIAL - Animated Toggle Button - [ Python, PySide6, Qt Widgets ] - MODERN GUI - Custom Widget

  Рет қаралды 29,660

Wanderson

Wanderson

3 жыл бұрын

In this tutorial I will teach you how to create a custom "Toggle Button" with a modern interface where you can use it to replace the standard "QCheckBox" of Qt tools, using Qt Widgets.
In this Widget we can change its width, color and animation curve.
[ DOWNLOAD Source Code ]
🔗 Patreon: / wandersonismyname
Used in this project:
Python 3.9.1
PySide6 v6.0.2 (support PyQt6)
Qt Widgets
-----
//// DONATE ////
🔗 Donate (Gumroad): gum.co/mHsRC
//// PATREON ////
🔗 Patreon: / wandersonismyname
//// DISCORD ////
🔗 Discord: / discord
Subscribe to not miss any news from the channel.
See you in the next videos.
-----------------------------
Feather by Waywell / waywell
Creative Commons - Attribution-ShareAlike 3.0 Unported - CC BY-SA 3.0
Free Download / Stream: bit.ly/_feather
Music promoted by Audio Library • Feather - Waywell (No ...
-----------------------------

Пікірлер: 47
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
[ DOWNLOAD Source Code ] 🔗 Patreon: www.patreon.com/WandersonIsMyName Free for everyone on GitHub in June 1st!
@1mrnewton
@1mrnewton Жыл бұрын
update: at 8:00 if you're using PyQt5, use: pyqtProperty instead of: Property
@sukhmanpreetsingh-ev1oe
@sukhmanpreetsingh-ev1oe 6 ай бұрын
Bro thank you so much. I was facing this problem
@iwinter6614
@iwinter6614 3 жыл бұрын
You don't even know how much I appreciate your work! You helped me so much bro keep it up you're insanely skilled.
@dursinear8761
@dursinear8761 3 жыл бұрын
its incredible. You are mad man! Thank you!
@israelluque3326
@israelluque3326 Жыл бұрын
I love you!!! Very good explanation.
@luvyana
@luvyana 3 жыл бұрын
Thanks a lot. Learnt so much from this. Could you make a tutorial on how to make sliders with 2 3 controls (range sliders) if it's possible, that would be soooo amazing
@anhnhat35
@anhnhat35 3 жыл бұрын
many thanks
@HyeokKIM
@HyeokKIM Жыл бұрын
Wow Good lecture.
@samansamani4477
@samansamani4477 3 жыл бұрын
thank you
@KaladharGopal
@KaladharGopal 3 жыл бұрын
Sir, I am struggling with QThread, please a dedicated video on that on how can we use it with different widgets and to do background Processes ki doing internet speed test with speedtest library or playing sound with playsound instead of using Pyqt's own function, that would be helpful for other things too.
@fun8402
@fun8402 3 жыл бұрын
been wondering how to do this, I'll be at the premiere
@vpxnyy4476
@vpxnyy4476 2 жыл бұрын
thx bro
@umion9529
@umion9529 2 жыл бұрын
Hello, I got an error : name Property is not defined. Where did you define it? Thanks
@melsjagt5829
@melsjagt5829 3 жыл бұрын
What VScode extension are you using to automate blue font color for modules (e.g., QPainter(), QRect())? Great video btw!
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Is Atom IDE theme, One Dark :D
@MohamedGamal-mt7io
@MohamedGamal-mt7io 2 жыл бұрын
Can you send me a link to the desktop picture because it is beautiful I like it?
@sekiro_19
@sekiro_19 3 жыл бұрын
rare video of creating toggle button with qt
@joelkklein8760
@joelkklein8760 3 жыл бұрын
Great video, I was trying to create one, But i want to know how use this widget in Qtdesigner, for use with other widgets in same window..
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
It is only possible to create custom widgets for Qt Designer using C++, unfortunately done in Python you cannot integrate it with your project, at least I believe it is not. This custom widget you need to add manually to your project, just like I did in the video
@uysal1075
@uysal1075 3 жыл бұрын
If i got the problem right i think you can use your custom widgets in Qt Designer. After creating a custom python class like Wanderson did you can promote your regular button or other wigdets to your class. I hope i didnt cross the line.
@jacquesdefontaine8039
@jacquesdefontaine8039 3 жыл бұрын
Excellent Wanderson. Thank you! The only issue is I'm getting an syntax error at this function: def hitButton(self, pos: QtCore.QPoint): return self.contentsRect().contains(pos) Thank you
@jacquesdefontaine8039
@jacquesdefontaine8039 3 жыл бұрын
The error is [E0001] by the way
@eugeneizmailov6815
@eugeneizmailov6815 2 жыл бұрын
def hitButton(self, pos): return self.contentsRect().contains(pos)
@destroyer1926
@destroyer1926 3 жыл бұрын
hi! could you help me figure out how to implement an anchor in QT?
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
In this course I teach how to create layouts using anchoring in Qt Quick: kzbin.info/www/bejne/pnWThph6bLhlbdU
@joelkklein8760
@joelkklein8760 3 жыл бұрын
I have a big question... when i put 2 or more widgtes... How I know in backend what widget change the status.. both tells the same..??
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
All widgets need an object name, like "self.button", "self.toggle", "self.label", so just use slots or events to get this objects. In this toggle button you can check using "statusChanged" or "isChecked"
@VitorSilva-gi3lb
@VitorSilva-gi3lb 3 жыл бұрын
Voce nao me engana wanderson, pq n grava em portugues wanderson, ta dicil wanderson,, aaaaaaaaah wanderson me ajuda ai cara
@blackjaquar
@blackjaquar 3 жыл бұрын
Great work. You are a godsend!!! I've been following your work very closely. I'm having a weird error : NameError: name 'Property' is not defined, although my code is identical to yours with the only difference is that I'm using PyQT5 rather than PySide6. Any help is appreciated.
@lintionglau1199
@lintionglau1199 3 жыл бұрын
For PyQt5, use @pyqtProperty decorator rather than @Property
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Yes, PyQt have some different classes like, pyqtSlot(), pyqtSignal(), pyqtProperty()... But works in the same way.
@blackjaquar
@blackjaquar 3 жыл бұрын
@@WandersonItsMe @LinTiong Lau, Thanks you for your response. It works beautifully now.
@omaral-halabiah2851
@omaral-halabiah2851 3 жыл бұрын
@@lintionglau1199 yes. and we have to add the following import from PyQt5.QtCore import QObject, pyqtProperty
@urlanbarros
@urlanbarros 3 ай бұрын
Man, why does not exist a "switch bottom" integrated in Qt Designer?
@oneleven112
@oneleven112 2 жыл бұрын
I cannot use the button on the whole surface
@joelkklein8760
@joelkklein8760 3 жыл бұрын
Hi, this widget is only for pyqt6??
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Hi, No! its was made using PySide6, but works with previous versions. To work with PyQt you need to change @Property to @pyqtProperty.
@rishabh152
@rishabh152 3 жыл бұрын
does it support pyside2 aswell..? @wanderson
@nerophesis
@nerophesis 2 жыл бұрын
trying to implement in maya with pyside2, kinda not working for me :S
@yura2110
@yura2110 2 жыл бұрын
wah le lvl
@gergoborhegyi5388
@gergoborhegyi5388 3 жыл бұрын
Why did you use Qframe As the container?
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Because is just a simple test code, usually I'm using QWidget because is default in Qt.
@gergoborhegyi5388
@gergoborhegyi5388 3 жыл бұрын
Ohh okey. I just thought maybe Qframe has some secret capabilities that I didn't know about. Thanks. Wonderful video. I dont understand half of it but progress needs Time.
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
It wasn't for any special reason that I chose QFrame haha. Good studies!
@terminalgoat232
@terminalgoat232 3 жыл бұрын
ok
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 39 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 75 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 11 МЛН
Custom Qt Widgets: Implementing a Toggle Switch
11:09
KDAB
Рет қаралды 2,9 М.
QtDesigner and PyQt5:  The right and wrong way to use them together
37:16
Alan D Moore Codes
Рет қаралды 107 М.
Working With Qt Designer's UI Files And PyQt
19:17
DistroTube
Рет қаралды 16 М.
How I make science animations
43:39
Artem Kirsanov
Рет қаралды 704 М.
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 124 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,2 МЛН
Телефон-електрошокер
0:43
RICARDO 2.0
Рет қаралды 1,3 МЛН
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 757 М.
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,2 МЛН