How to set a GUI Theme to a Qt Widgets Application

Поделиться
HTML-код
  • Опубликовано: 13 дек 2024

Комментарии • 60

  • @ideadomg
    @ideadomg 3 года назад +16

    Clear, concise, to the point. Wish every tutorial was like this.

  • @silversurfer8057
    @silversurfer8057 3 года назад +2

    perfect .... no fancy useless stuff - just on point!

  • @joeking5211
    @joeking5211 Год назад

    Stunning vid. Many thks

  • @shayneoneill1506
    @shayneoneill1506 2 месяца назад

    Great tutorial. Though some of those qss-stock themes will need a *lot* of editing to excise the eye-bleed out of them. Gotta love programmer art , I guess.

  • @TheProGamerVibes
    @TheProGamerVibes 3 года назад +1

    thanks i been searched for this long time i think i need to learn css now

    • @VelcodeCS
      @VelcodeCS  3 года назад +1

      I could use learning some more CSS for sure here too

  • @BharathRamMS
    @BharathRamMS 2 года назад

    Fantastic! Thanks for letting us know this information. Many thanks to you.

  • @GemVic327
    @GemVic327 Год назад +1

    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  Год назад

      I explain that here: ruclips.net/video/XiMplRfuFJc/видео.html

  • @HanKog-h2j
    @HanKog-h2j 8 месяцев назад

    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?

  • @leonardopinheiro6693
    @leonardopinheiro6693 2 года назад +1

    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 года назад +1

      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!

  • @marocTV3
    @marocTV3 3 года назад +1

    thanks for the video and website i need it

  • @idcrafter-cgi
    @idcrafter-cgi 3 года назад

    on Linux you have native themes via kdestheme manager in it settings

  • @WahyuExano
    @WahyuExano 3 года назад

    Thanks for your tutorial. Greeting from Indonesia!

    • @VelcodeCS
      @VelcodeCS  3 года назад

      No problem and hello to Indonesia!

  • @jessprogany4345
    @jessprogany4345 3 года назад

    thanks man, really helpful video
    cudos to the site

  • @digitalmachine0101
    @digitalmachine0101 5 месяцев назад

    Good information

  • @beaconbecay1648
    @beaconbecay1648 3 года назад

    Thanks for helping.

  • @thuytienpham5428
    @thuytienpham5428 3 года назад +1

    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 года назад +2

      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:
      ruclips.net/video/XiMplRfuFJc/видео.html
      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:
      ruclips.net/video/h_DVfsD9PKI/видео.html
      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 года назад +1

      No problem and good luck!

  • @gatovsky
    @gatovsky 3 года назад

    Excelente!!!

  • @huanzhang5479
    @huanzhang5479 3 года назад

    there are two or more qpushbuttons,if i want to set different theme for different qpushbutton, how to distinguish in qss file?

    • @VelcodeCS
      @VelcodeCS  3 года назад

      You can use the ID selector (#). See the documentation for an example:
      doc.qt.io/qt-5/stylesheet-syntax.html

  • @noah_bishop_z
    @noah_bishop_z Год назад

    Thanks 👍

  • @stevehageman6785
    @stevehageman6785 3 месяца назад

    Nice! :-)

  • @lopo8000
    @lopo8000 2 года назад

    How did u design the qttheme before adding the .css??

    • @VelcodeCS
      @VelcodeCS  2 года назад

      Which theme? The white one?

  • @sherafati
    @sherafati 3 года назад +2

    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())

  • @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)

  • @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 года назад +1

      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

  • @jacquesningana8283
    @jacquesningana8283 2 года назад

    Thanks

  • @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!

  • @beyondhorizons9758
    @beyondhorizons9758 4 года назад

    Awesome !

  • @gregoryjoy2689
    @gregoryjoy2689 2 года назад

    How do you make a light and dark mode

    • @VelcodeCS
      @VelcodeCS  2 года назад +1

      You can create two separate themes and load the one you want depending on the mode that is selected.

  • @abcxyz-nd6xh
    @abcxyz-nd6xh 3 года назад +2

    Great & Practical Tutorial!
    Pure MS Theme is Boring!

    • @VelcodeCS
      @VelcodeCS  3 года назад

      Agree, but sometimes boring is okay 😁

  • @karimklila9991
    @karimklila9991 3 года назад

    QIODevice::read (QFile, ".\Obit.qss"): device not open

  • @amnesie148
    @amnesie148 4 года назад

    goood!

  • @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 года назад +1

      Well, I don't know what you're doing, but you seem to have found your solution 👍

    • @seghirissam2662
      @seghirissam2662 3 года назад

      @@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  3 года назад

      @@seghirissam2662 what is pylance?

  • @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!

  • @markcuello5
    @markcuello5 Год назад

    HELP