Python, PySide2, Qt Designer - Custom Title Bar [Modern GUI / Flat GUI] (Time-lapse Video)

  Рет қаралды 64,500

Wanderson

Wanderson

Күн бұрын

Пікірлер: 112
@jonasbenediktarndt6211
@jonasbenediktarndt6211 3 жыл бұрын
This is useful in so many ways. Not just for Python but also for any kind of GUI that accepts CSS. Really thankful for this tutorial and the other videos! They really helped me to see the possibilities and how a GUI does not have to look awful or boring.
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Thank you very much ❤. I'm release a new free course about Qt Quick (most recent Qt technology) . New video tomorrow. kzbin.info/www/bejne/pnWThph6bLhlbdU
@chetana9802
@chetana9802 3 жыл бұрын
6:05- 9:13 making maximize, minimize and close buttons 9:16 making frame_grip and frame_lable_credits 11:48 adding content
@bstsimo
@bstsimo 4 жыл бұрын
You are the Tony Stark of Python GUI my friend, please don't stop inspiring the public with your ideas.. Best of luck
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Thanks man 😀. Tony Stark poor version hahahaha
@bstsimo
@bstsimo 4 жыл бұрын
@@WandersonItsMe You are rich enough with such a mind you have. push us forward please :D
@DevBossMa
@DevBossMa 3 жыл бұрын
I like this "If You control the code, You control the world 🌎🌎🌍🌎🌎🌍🌎🌎" thank you bro for this amazing tuto, big respect 👍
@hoholord5699
@hoholord5699 4 жыл бұрын
u r insane , pushing the boundaries of PyUI , i have started too
@kaiquesantos5324
@kaiquesantos5324 3 жыл бұрын
Cara esse seu conteúdo é de muita importância para a comunidade QT no Brasil.
@kotedo4943
@kotedo4943 3 жыл бұрын
O my God... I really didn't think that with Python can make so unbelievable things. Thank you for that tutorial!
@prashkd7684
@prashkd7684 4 жыл бұрын
Wonderful. I am not a UI designer and was looking for a quick guide to generate a decent looking GUI for my application. I knew I will need to use CSS extensively for this but wasn't sure of its value / limitation. This video provides all the motivation i needed to try it myself.
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Happy for you 😃. Here have a documentation of QSS, use some parameters like CSS: doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties
@prashkd7684
@prashkd7684 4 жыл бұрын
@@WandersonItsMe Thanks for sharing.
@user--10552
@user--10552 4 ай бұрын
of course i'll drop like, you are the best, you gave me a push forward, Thank you, keep going.
@viniciuseliasdasilva236
@viniciuseliasdasilva236 3 жыл бұрын
Foi a primeira pessoa que vi usando o Qt assim, parabéns!
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Vlw Vinicius, brigadão cara!
@gg_man9392
@gg_man9392 3 жыл бұрын
Good video! Just what I needed! I have some issues in Archlinux moving the window and maximizing/restoring it but in general the walk-through is really good.
@kathawutpoldet2817
@kathawutpoldet2817 4 жыл бұрын
Best pyside gui tut ever!
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Thanks man ❤
@rijulsingla
@rijulsingla 4 жыл бұрын
Awesome work man!! Loved it! Was looking for something like this. Thanks a lot.
@WertiGo260990
@WertiGo260990 3 жыл бұрын
GREAT!!!! This is what i needed!!!
@simafeima
@simafeima 2 жыл бұрын
It's great help for me,learned a lot.Thank you for your work!!!
@hohojimmy4443
@hohojimmy4443 3 жыл бұрын
Sooo beautiful!
@marcryziusvalkerbur6037
@marcryziusvalkerbur6037 3 жыл бұрын
Que foda! Quiçá um dia eu consiga programar dessa forma ou melhor. Estou aprendendo bastante com seus vídeos.
@김준학-s7o
@김준학-s7o Жыл бұрын
Thanks a lot!! it was really helpful!!
@MrLostWizard
@MrLostWizard 4 жыл бұрын
I like what you'r doin. Keep it Up! KZbin hasn't enough python tutorial.
@shafiqsadat37
@shafiqsadat37 Жыл бұрын
You saved my day! Thanks man :/
@mrchuz0
@mrchuz0 3 жыл бұрын
Totalmente espectacular!! Muito obrigado!! I'm subscribing your patreon searching for more videos like this!!
@dennisasamoah2213
@dennisasamoah2213 4 жыл бұрын
simply outstanding and unique
@AutomationTank
@AutomationTank 4 жыл бұрын
Awesome Job 👌 Thanks for bringing such a nice thing for us!!
@OMFGNation
@OMFGNation 4 жыл бұрын
Can u make a tutorial of QThread in Requests :> I hope someday you will thank you i like your tutorials! Minimalist good for eyes!
@antoniosdamico
@antoniosdamico 3 жыл бұрын
Great Tutorial! Thank you very much for it. It's outstanding
@dannyantoine8472
@dannyantoine8472 3 жыл бұрын
It scales nicely. How did you accomplish this? when you maximize the screen it gets bigger.
@lassinaouattara1213
@lassinaouattara1213 4 жыл бұрын
amazing thanks a lot Sir for thoses great tutorials,the best ever,looking forward for more videos ;)
@barkas2589
@barkas2589 2 жыл бұрын
Thanks !
@soulaimanacrespo9475
@soulaimanacrespo9475 4 жыл бұрын
Merci, c'est magnifique, you do it. Bravo
@GoodBoyDanny
@GoodBoyDanny 4 жыл бұрын
To be honest thanks for these ui tutorials.
@prashasthnair9198
@prashasthnair9198 3 жыл бұрын
hey I cannot understand how you make buttons and label response to size of the window when I try the buttons remain in same place. Please help
@felixluebkenn
@felixluebkenn 4 жыл бұрын
This is incredibly helpful
@ЛюбомирПона
@ЛюбомирПона 4 жыл бұрын
Amazing!!!! Can you make a video how to write a class to play audio (background music, in-app sounds). You need to be able to inherit from such a class and get support for playing music and sounds in the application. Also background music must can be played in a queue and switch back forward, increase and decrease the volume. I wrote a class like this and it works. But there are some nuances: playback supports uncompressed wav format. If this is not critical for sounds, then for background music with a queue of 20 tracks, the size of the application will increase (about 10 times compared to mp3). In fact, mp3 as a background music source works without problems, but after we make an executable file using the pyinstaller module - mp3 cannot be loaded for further playback (there is no such problem with wav). In my class, I used the pygame.mixer.music module and the Sound class also from pygame. I would like to look at the solution of such a problem from the other (your) side. Of course, binding to the pygame module is not required, it is possible to use others, the main thing is to solve the problem with playing mp3 after packing pyinstaller (there are no problems with playing before packing). Thanks in advance! Изучаем мир ИТ / Олег Шпагин / WISEPLAT #! /usr/bin/env python # -*- coding: utf-8 -*- import sys import os import pygame from pygame import mixer from random import shuffle from os import listdir class Sound(object): # инициализация и запуск воспроизведения def __init__(self): self.volume = 1 self.first_playing = True # первое нажатие на кнопку play self.played_count = 0 # количество нажатий на play self.track_number = 0 # текущий номер трека # инициализируем pygame и mixer mixer.init() pygame.init() # получим и перемешаем список треков self.tracks = self.get_all_tracks('audio/music/', 'mp3') shuffle(self.tracks) # зададим пользовательское событие по окончанию воспроизведения self.end = pygame.USEREVENT + 1 mixer.music.set_endevent(self.end) # запустим воспроизведение self.play() # получить список всех композиций @staticmethod def get_all_tracks(path, extension): # получим абсолютный путь if getattr(sys, 'frozen', False): absolute_path = sys._MEIPASS else: absolute_path = os.path.split(os.path.realpath(__file__))[0] full_path = f'{absolute_path}\\{path}' # получим список всех файлов в папке files = listdir(full_path) # с помощью генератора сформируем список файлов с нужным расширением all_tracks = [full_path + track for track in files if track.endswith(f'.{extension}')] return all_tracks # проигрывание/пауза композиции def play(self): try: # при первом нажатии на кнопку play if self.first_playing: # если запустили впервые if self.played_count == 0: self.played_count += 1 mixer.music.load(self.tracks[self.track_number]) mixer.music.play() # увеличим номер трека self.track_number += 1 # если нажали на паузу впервые elif self.played_count == 1: self.played_count += 1 mixer.music.pause() self.first_playing = True # снять с паузы else: mixer.music.unpause() self.first_playing = False else: mixer.music.pause() self.first_playing = True # если достигли конца списка всех композиций except IndexError: self.track_number = 0 # текущий номер трека self.played_count = 0 # количество нажатий на play self.play() # предыдущая композициия def previous(self): self.track_number -= 2 # сбросим все счётчики self.first_playing = True self.played_count = 0 self.play() # следующая композициия def next(self): # сбросим все счётчики self.first_playing = True self.played_count = 0 self.play() # увеличить громкость def volume_plus(self): if self.volume < 1: self.volume += 0.2 mixer.music.set_volume(self.volume) # уменьшить громкость def volume_minus(self): if self.volume > 0: self.volume -= 0.2 mixer.music.set_volume(self.volume) # проигрывание звуков (wav) @staticmethod def play_sound(path): sound = pygame.mixer.Sound(path) sound.play() # создать папку audio, в ней папку music. В music залить mp3 композиции # в классе-потомке наследоваться от класса Sound и написать: # вызовем конструктор класса Sound Sound.__init__(self) self.first_run = True self.play_sound = True while True: # при первом запуске if self.first_run: self.first_run = False # получим событие с pygame for event in pygame.event.get(): # если событие совпадает с тем что мы зарегистировали ранее if event.type == self.end: # проиграем следующий трек self.next()
@hichemmahfoudh
@hichemmahfoudh 4 жыл бұрын
Amazing skills!
@SpinnTV
@SpinnTV 4 жыл бұрын
you totally deserve my subscription
@s.joseph406
@s.joseph406 4 жыл бұрын
I love it !
@stovegamesgames6917
@stovegamesgames6917 3 жыл бұрын
For Top Right Buttons : QPushButton{ border:none; border-radius: 8px; background-color: rgb(255,0,0); } QPushButton:hover{ background-color:rbg(255,0,0,150); }
@rafinhapederivaa
@rafinhapederivaa 3 жыл бұрын
Excelente conteúdo!!!
@xXCrackFireXx
@xXCrackFireXx 4 жыл бұрын
Thank you very much! A question though, why did you decided to use ui instead of qml?
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Because QML is part of Qt's paid applications and doesn't work as a programmer, just as free tools.
@facundoreyes
@facundoreyes 4 жыл бұрын
Amazing, this really helped me!
@Agrover112
@Agrover112 4 жыл бұрын
Beautiful!
@ploppyploo
@ploppyploo 4 жыл бұрын
hey man!. Im unable to disable the titlte bar. It says mainwindow object has no attribute setwindowflag. i checked case .what am i missing? EDIT:nervermind i changed self to mainwindow and it works fine.Thank You!
@drip7547
@drip7547 4 жыл бұрын
thank u sooooooo much man
@voidreamer
@voidreamer 3 жыл бұрын
Wonderful! Do you think it’s possible to do without QT designer?
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Yes, just need to learn how to create manually widgets with Qt Widgets.
@sherafati
@sherafati 4 жыл бұрын
Wow! I can't believe it's possible to create these amazing widgets without QML and only with widgets. Can i use this GUIs in my own applications?
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Thanks 😀. Sure! Is free to use!
@ashwin372
@ashwin372 4 жыл бұрын
wow thanks!
@djhusten9690
@djhusten9690 3 жыл бұрын
nice !!!
@drip7547
@drip7547 4 жыл бұрын
very good
@yacinedali2756
@yacinedali2756 4 жыл бұрын
Magnificent
@klingerandrealmeida5238
@klingerandrealmeida5238 4 жыл бұрын
Parabéns!
@seopi
@seopi 4 жыл бұрын
Perfect!
@MegaSolitarywolf
@MegaSolitarywolf 4 жыл бұрын
Excelent video, a question man, how could I implement it in Qt but with c ++, I would be interested in doing it, I did the video and well, I did not have good results when I passed it to c ++, I would appreciate any help, greetings and success.
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
C++ is the primary language for Qt, and a lot of things should work quite differently. However on the official Qt website you will find a very large communication, greater than that of Python. I used several C++ documents and adapted to Python (even though I didn't know C++) that the documentation is quite different, but the Qt Designer part is the same.
@tjshultz89
@tjshultz89 4 жыл бұрын
That looks amazing! Was it really just these 2 lines of code that disabled the default title bar? self.setWindowFlag(QtCore.qt.FramelessWindowint) self.setAttribute(QtCore.qt.WA_TransluscentBackground) You really had a ton of work to do just to create a new title bar with the same functionality, but more sleeker "mac" looking.
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
It really is a little complicated, but it is interesting depending on the interface of the project. Yes, only two lines to disable! self.setWindowFlag (QtCore.qt.FramelessWindowint) (remove standard title bar) self.setAttribute (QtCore.qt.WA_TransluscentBackground) (makes the application background transparent)
@xxxxxxx38
@xxxxxxx38 4 жыл бұрын
Hi guys, how can i do it in c++ ?
@leandrolino215
@leandrolino215 4 жыл бұрын
Congrats! Great Job. Could you explain how to do appear the option 'View Python Code' on my Qt Designer?
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Hi, when you install PySide2 it also installs this version of Qt Designer, it is in the Python modules folder.
@leandrolino215
@leandrolino215 4 жыл бұрын
@@WandersonItsMe thanks man
@prashkd7684
@prashkd7684 4 жыл бұрын
Do you have any reference material (books courses etc) on the use of CSS and pyside 2 ?
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Unfortunately, I don't have about CSS, but there is a lot of Qt documentation: doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties Qt use QSS with some references of CSS and CSS3.
@saurabh_ritu
@saurabh_ritu 3 жыл бұрын
How to make UI responsive, mine one is static to one frame even I maximize my window?
@danmaster666
@danmaster666 Жыл бұрын
Does anyone know how to make this work with Pyinstaller? It keeps showing the operating system title bar when I generate the executable.
@FacundoDeveloper
@FacundoDeveloper 4 жыл бұрын
Is very cool :)
@gabegabriel9288
@gabegabriel9288 4 жыл бұрын
Hey man how did you add the Roboto font to QT Designer? I've been trying and cant get anything
@gabegabriel9288
@gabegabriel9288 4 жыл бұрын
I have it downloaded btw
@yourfriendlyneighborhood5547
@yourfriendlyneighborhood5547 3 жыл бұрын
@@gabegabriel9288 how man? Can you say it ASAP
@gabegabriel9288
@gabegabriel9288 3 жыл бұрын
@@yourfriendlyneighborhood5547 it's been a while but you have to add it to your resources folder. Lookup how to add stuff to resources, also after you'll need to change that resources folder to a python file to be used in your source code
@yourfriendlyneighborhood5547
@yourfriendlyneighborhood5547 3 жыл бұрын
@@gabegabriel9288 yeah man I know how to add resources
@RemshidAbdulSathar
@RemshidAbdulSathar 4 жыл бұрын
How we can read CPU / Memory usage of the system and update it in the above progress bar dynamically? Please help me on this
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Try to use some library like pypi.org/project/psutil/ to get this data and use QTimer to update this info in your application in specific time.
@omaral-halabiah2851
@omaral-halabiah2851 3 жыл бұрын
is there any tools to build python's app - which use PyQt5 or PySide2 - into mobile app "android - ios" ? if it is : please make video about its usage.
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Python is not a good option for mobile, because Python don't have native support. Best option is to use native features, Flutter, React or Xamarin.
@omaral-halabiah2851
@omaral-halabiah2851 3 жыл бұрын
@@WandersonItsMe can I use python code with any of it ? and which tool is better for that , What do you recommend
@a6fcstt10
@a6fcstt10 3 жыл бұрын
25:43 I still do not understand ! Where does the code in main.py come from?
@katmanduYT
@katmanduYT 3 жыл бұрын
YOU CONVERT THE UI FILE TO PY
@katmanduYT
@katmanduYT 3 жыл бұрын
in cmd
@shivamshandilya5059
@shivamshandilya5059 4 жыл бұрын
border-radius property is not applying on closebutton! why is this happening
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Check borde size and if style ends with ";". Example: If your button have 20px width an 20px height, max border radius is 10px. Size / 2.
@shivamshandilya5059
@shivamshandilya5059 4 жыл бұрын
@@WandersonItsMe Thanks i will try it !
@heyyou9409
@heyyou9409 4 жыл бұрын
Ao invés de colocar um texto “25%”, como posso inserir um output? Seria um output diferente de acordo com a entrada, como no seu vídeo “Render Time Calculator v2.1.0”.
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Sim mano! Nesse caso é apenas um exemplo, pode personalizar como quiser as informações. Tanto que até estão estáticas para servirem mesmo como inspiração para outros projetos. Bons estudos! 😃
@nahuelastor9320
@nahuelastor9320 3 жыл бұрын
I have the next error... ...\ui_functions.py, line 5 in NameError: name 'MainWindow' is not defined
@WandersonItsMe
@WandersonItsMe 3 жыл бұрын
Check if class "MainWindow" was imported.
@ilsonjunior2805
@ilsonjunior2805 3 жыл бұрын
Boa tarde muito bom seus vídeos, gostaria de saber se vc poderia me dar um ajuda tenho um App em Python rodando via cmd precisa fazer o front-end dele porém não consigo por exemplo pegar uma variável do meu App e jogar na interface! Exemplo tenho um arquivo.py do meu App e o arquivo.py da Main interface onde instanciei o arquivo.py do meu App porém não consigo visualizar em uma Textbox da interface! De qualquer forma seus vídeos são top!
@rahulps
@rahulps 3 жыл бұрын
move window is not working
@wildantammafaza9016
@wildantammafaza9016 3 жыл бұрын
yup, i had that problem too. but, when i drag on frame_btns side, it's working
@AcademyOmen
@AcademyOmen 3 жыл бұрын
Saw python so i clicked
@joaocruztech
@joaocruztech 4 жыл бұрын
Como você consegue gerar o código em python diretamente pelo Qt Designer?
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Sim mano, quando instala o PySide2 ele vem com essa versão do Qt Designer que já gera a classe em Python
@impulse_ger
@impulse_ger 4 жыл бұрын
Can I do the same with Qt Creator in C++?
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Yes, is possible! C++ is the main language of Qt! 😀
@hectamus_
@hectamus_ 4 жыл бұрын
for some reason this doesn't seem to work for me
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Download the official project (video description) and check function by function.
@evertonalmeida5390
@evertonalmeida5390 4 жыл бұрын
Primeiro
@shuxiang4716
@shuxiang4716 2 жыл бұрын
could cpp qt accustom this theme?😂
@granand
@granand 4 жыл бұрын
Not for beginners..I only here loud music
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
Disable de music 🤪
@granand
@granand 4 жыл бұрын
@@WandersonItsMe Dumb me! My eyes will hurt :-) basically I might need starting course to take me along why and what we are doing sir. I will search your playlist if you were kind to have some video which enables me to understand this
@procode6881
@procode6881 4 жыл бұрын
There is no need of coding in this???
@WandersonItsMe
@WandersonItsMe 4 жыл бұрын
I only use Qt Designer to code the graphical interface :D
@procode6881
@procode6881 4 жыл бұрын
@@WandersonItsMe got it
QtDesigner and PyQt5:  The right and wrong way to use them together
37:16
Alan D Moore Codes
Рет қаралды 108 М.
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 34 МЛН
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 1,8 МЛН
I Paid a Stranger $25 to edit my Pizza Commercial
13:31
Daniel Schiffer
Рет қаралды 17 МЛН
PyQt vs. PySide: Differences, Similarities, and Licenses [2022]
6:58
Code First with Hala
Рет қаралды 53 М.
A basic PySide6 and Qt Designer tutorial.
1:33:05
Jason Codes Qt
Рет қаралды 42 М.
I Paid Bassists to Play an IMPOSSIBLE Bassline...
13:16
Davie504
Рет қаралды 17 МЛН
384 Days in 8 Minutes - TOP 8 Plant Growing Time-lapses
8:07
Boxlapse
Рет қаралды 5 МЛН
Bean Time-Lapse - 25 days | Soil cross section
3:10
GPhase
Рет қаралды 41 МЛН
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 34 МЛН