How to set a GUI Theme to a Qt Widgets Application

  Рет қаралды 58,033

Velcode

Velcode

Күн бұрын

In this video, I show you how to set the overall theme (style sheet) of your Qt widgets application.
Free QSS style sheets: qss-stock.devsecstudio.com/
Qt style sheet documentation: doc.qt.io/qt-5/stylesheet-ref...
__ Social Media __
Instagram: / velazcojd
Podcast: / @unqualifiedgurus
__ Equipment __
Microphone: amzn.to/3leXZR4
Touch Input: amzn.to/30Z1Mex
Main Monitor: amzn.to/3rfwfiQ
Second Monitor: amzn.to/3Gw8NTv
Video Editing: amzn.to/3lgb8Jv
Video Camera: amzn.to/3nrwFjq
Main Lighting: amzn.to/3GLE9FX
Secondary Lighting: amzn.to/3npEsi0
Headphones: amzn.to/3A0GjP7
USB Drive: amzn.to/3Gvm9PD

Пікірлер: 57
@ideadomg
@ideadomg 3 жыл бұрын
Clear, concise, to the point. Wish every tutorial was like this.
@BharathRamMS
@BharathRamMS Жыл бұрын
Fantastic! Thanks for letting us know this information. Many thanks to you.
@silversurfer8057
@silversurfer8057 2 жыл бұрын
perfect .... no fancy useless stuff - just on point!
@joeking5211
@joeking5211 Жыл бұрын
Stunning vid. Many thks
@jessprogany4345
@jessprogany4345 3 жыл бұрын
thanks man, really helpful video cudos to the site
@jaturon2746
@jaturon2746 3 жыл бұрын
thanks i been searched for this long time i think i need to learn css now
@VelcodeCS
@VelcodeCS 3 жыл бұрын
I could use learning some more CSS for sure here too
@beaconbecay1648
@beaconbecay1648 2 жыл бұрын
Thanks for helping.
@beyondhorizons9758
@beyondhorizons9758 3 жыл бұрын
Awesome !
@WahyuExano
@WahyuExano 3 жыл бұрын
Thanks for your tutorial. Greeting from Indonesia!
@VelcodeCS
@VelcodeCS 3 жыл бұрын
No problem and hello to Indonesia!
@3arabiWalBanate
@3arabiWalBanate 3 жыл бұрын
thanks for the video and website i need it
@gatovsky
@gatovsky 2 жыл бұрын
Excelente!!!
@noah_bishop_z
@noah_bishop_z Жыл бұрын
Thanks 👍
@jacquesningana8283
@jacquesningana8283 2 жыл бұрын
Thanks
@idcrafter-cgi
@idcrafter-cgi 2 жыл бұрын
on Linux you have native themes via kdestheme manager in it settings
@leonardopinheiro6693
@leonardopinheiro6693 2 жыл бұрын
Very good. Thank you. I noticed that, in one of the themes (Combinear.qss) the arrows are missing (QSpinBox::down-arrow). I had to make my own.
@VelcodeCS
@VelcodeCS 2 жыл бұрын
Yes, many of these can use tweaks and additions for full UI coverage.
@Pixel_Magic
@Pixel_Magic 3 жыл бұрын
Hello, World! Hello from Russia! Thanks you for this video!
@VelcodeCS
@VelcodeCS 3 жыл бұрын
Hello to Russia!
@amnesie148
@amnesie148 3 жыл бұрын
goood!
@thuytienpham5428
@thuytienpham5428 3 жыл бұрын
Hey Vel! I'm a bloody beginner of everything so I'm really glad I found you who actually make things understandable thank you so much for that! This might be the most stupid question but uhm ...how do I get on the very first screen you have? What or where is this ? Could you tell me how to get the exact same starting postition with like all the files like you have in this video so I can try and recreate evrything from there like you do? Maybe you have a video on that already? But I can't find it because i don't know what everything is called x'D
@VelcodeCS
@VelcodeCS 3 жыл бұрын
Hey Thuy! I know the pain! First off, you have to have Qt set up in your machine, which may be slightly different depending on the OS you are using. I have a video on how to set up Qt (version 6) using CMake (another C++ tool). Then, using CMake, I generate a project that can be run with Visual Studio (the IDE). I suggest you start first by setting up Qt in your machine the way I do. This is the link to the video: kzbin.info/www/bejne/jpqwoZ-Im9p5gMU Once you have that setup, you'll know how we arrive to where this video beings (although I skip making the GUI, but it should be clear how that is done from the other video). If you want to know more on how to make the GUIs, you can view my other video: kzbin.info/www/bejne/npCnh5mpeZ6Dgas I hope this helps!
@thuytienpham5428
@thuytienpham5428 3 жыл бұрын
@@VelcodeCS woaaahh thank you so so much for replying and even took your time to explain it so thoroughly to me I really appreciate it! I will follow your instrcutions and will try not to loose my head xD Thank you again for helping me you are amazing!!
@VelcodeCS
@VelcodeCS 3 жыл бұрын
No problem and good luck!
@user-kb6bz9je4k
@user-kb6bz9je4k 3 ай бұрын
I tried your code to set the stylesheet, but it doesn't load it. That said, I noticed that my Qt 5.15.2 does not have a "QtTheme.h" header file. QtThemeSupport/qtthemesupportversion.h does not do the trick. Further, I saw that you are using "QtTheme window;" whereas my default app uses "MainWindow w;", which throws error "Unknown Type name". Did you run your code successfully on 5.15.2 or later?
@sherafati
@sherafati 3 жыл бұрын
Great video. I'm using Qt for Python and i'll try to implement it there. I believe it is possible.
@VelcodeCS
@VelcodeCS 3 жыл бұрын
If you have a chance and wouldn't mind reporting your findings 🙂
@moaminalabdullah175
@moaminalabdullah175 2 жыл бұрын
app = QApplication(sys.argv) sshFile= 'Filename.qss' with open(sshFile, 'r') as f: app.setStyleSheet(f.read())
@huanzhang5479
@huanzhang5479 2 жыл бұрын
there are two or more qpushbuttons,if i want to set different theme for different qpushbutton, how to distinguish in qss file?
@VelcodeCS
@VelcodeCS 2 жыл бұрын
You can use the ID selector (#). See the documentation for an example: doc.qt.io/qt-5/stylesheet-syntax.html
@GemVic327
@GemVic327 10 ай бұрын
Pls am still woundering how you brought Qt into visual studio. Did you ceate folder with visual studio and then download the CSS file into it?
@VelcodeCS
@VelcodeCS 9 ай бұрын
I explain that here: kzbin.info/www/bejne/jpqwoZ-Im9p5gMU
@lopo8000
@lopo8000 2 жыл бұрын
How did u design the qttheme before adding the .css??
@VelcodeCS
@VelcodeCS 2 жыл бұрын
Which theme? The white one?
@lopo8000
@lopo8000 2 жыл бұрын
Can u use a qt application for a game mod menu on a pc and also for a ps3?
@VelcodeCS
@VelcodeCS 2 жыл бұрын
Umm, I have never seen anyone do it. I would say there are better more adequate tools for those tasks (like Unity or Unreal)
@gregoryjoy2689
@gregoryjoy2689 Жыл бұрын
How do you make a light and dark mode
@VelcodeCS
@VelcodeCS Жыл бұрын
You can create two separate themes and load the one you want depending on the mode that is selected.
@hamsham8244
@hamsham8244 3 жыл бұрын
Hi I'm not getting these themes this is what I see in the application output could you please help. Could not parse application stylesheet qt.qpa.fonts: Unable to open default EUDC font: "C:\\Windows\\FONTS\\EUDC.TTE"
@VelcodeCS
@VelcodeCS 3 жыл бұрын
Hello! It seems that the theme you are using uses a particular font you do not have installed in your system. One thing to try (to verify this) is to try a completely different theme and see if that works. Based on that error, the thing that comes to mind is that the font you want to use is no where to be found.
@hamsham8244
@hamsham8244 3 жыл бұрын
@@VelcodeCS Thank you, it worked
@lopo8000
@lopo8000 2 жыл бұрын
does this also work with winforms?
@VelcodeCS
@VelcodeCS 2 жыл бұрын
I don't have experience with winforms, but I doubt it since this is qss (q for Qt). Maybe there's a css style way of doing things with winforms, but I don't know about any, sorry!
@abcxyz-nd6xh
@abcxyz-nd6xh 3 жыл бұрын
Great & Practical Tutorial! Pure MS Theme is Boring!
@VelcodeCS
@VelcodeCS 3 жыл бұрын
Agree, but sometimes boring is okay 😁
@karimklila9991
@karimklila9991 2 жыл бұрын
QIODevice::read (QFile, ".\Obit.qss"): device not open
@VelcodeCS
@VelcodeCS 2 жыл бұрын
\\
@adambukovsekdev
@adambukovsekdev 3 жыл бұрын
Didnt work for me, as I continued I started to get more and more Errors in the whole code.
@VelcodeCS
@VelcodeCS 3 жыл бұрын
What kind of errors ate you getting?
@adambukovsekdev
@adambukovsekdev 3 жыл бұрын
@@VelcodeCS It just says that I'm useing Variables that arent defined, and if I define them, it changes nothing. I talked to a friend about that, and he said that you were doing it completely wrong, and then it just worked with "setStyleSheet(stylesheet.qss)" instead of the whole code you were writeing.
@VelcodeCS
@VelcodeCS 3 жыл бұрын
Well, I don't know what you're doing, but you seem to have found your solution 👍
@seghirissam2662
@seghirissam2662 2 жыл бұрын
@@VelcodeCS for me : pylance detect is a lot of errors in the qss file but when i run the code its work normally
@VelcodeCS
@VelcodeCS 2 жыл бұрын
@@seghirissam2662 what is pylance?
@markcuello5
@markcuello5 Жыл бұрын
HELP
@TheGhostfaceKLR
@TheGhostfaceKLR 2 жыл бұрын
Who created that website?? The first text I saw read: "How It's Look Like" and "The graphic visual is something very important in a software". Not very confidence inspiring. LOL.
@VelcodeCS
@VelcodeCS 2 жыл бұрын
I have no idea, but it's not a bad place to start. I personally got one from there and added/modified elements. But I agree, the one I used had a lot of little issues, but hey, it's free!
How to Add & Remove Qt Widgets Dynamically at Runtime
15:03
How to use Qt Layouts
19:18
Velcode
Рет қаралды 89 М.
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 63 МЛН
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 466 М.
How to Deploy a Qt Widgets Applications on Windows
6:03
Velcode
Рет қаралды 26 М.
PyQt5 Tutorial - How to Use Qt Designer
10:53
Tech With Tim
Рет қаралды 784 М.
How Qt Signals & Slots Work
20:10
Velcode
Рет қаралды 23 М.
Qt Tutorial : C++ Notepad App
38:18
Derek Banas
Рет қаралды 442 М.
you need to build a RUST desktop app!!
27:21
Travis Media
Рет қаралды 285 М.
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2 МЛН
Qt Widgets or QML ?
11:45
LearnQtGuide
Рет қаралды 58 М.
Выбор подарка на приеме у детского стоматолога в Inwhite Medical Kids
0:34
Inwhite Medical - Стоматология Москва
Рет қаралды 15 МЛН
ОЧЕНЬ ВКУСНЫЙ БУТЕРБРОД 🍞
0:49
КиноХост
Рет қаралды 4,8 МЛН
Safe
0:16
OHIOBOSS SATOYU
Рет қаралды 6 МЛН
Berbagi lolipop ke orang buntung‼️
0:14
Abil Fatan Key
Рет қаралды 10 МЛН
how to make a dratti dratte making #viral #dratti #dratte
0:15
offical Blacksmith
Рет қаралды 43 МЛН
Выбор подарка на приеме у детского стоматолога в Inwhite Medical Kids
0:34
Inwhite Medical - Стоматология Москва
Рет қаралды 15 МЛН