Creating Your Own Qt Applications...It's Easy!

Поділитися
Вставка
  • Опубліковано 1 жов 2024
  • I've done some videos in the past creating GTK apps, but today I'm creating my very first Qt app using 'Qt Designer' and 'pyqt5'. Creating a Qt app with these tools is shockingly simple.
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.youtube.co...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/...
    DONATE CRYPTO:
    💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
    🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
    📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    📁 GitLab: gitlab.com/dwt1
    🗨️ Mastodon: fosstodon.org/...
    👫 Reddit: / distrotube
    📽️ LBRY/Odysee: odysee.com/@Di...
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Tenacity: github.com/ten...
    💻 VirtualBox: www.virtualbox...
    🗒️ Doom Emacs: github.com/hli...
    Your support is very much appreciated. Thanks, guys!

КОМЕНТАРІ • 86

  • @jaxxarmstrong
    @jaxxarmstrong Рік тому +58

    Now THIS is very useful information for users who would like to dip their toes into the world of coding, but has been seemingly overwhelmed. Please keep 'em coming DT.

    • @essetee
      @essetee Рік тому

      This is not useful. That's the worst possible example of how to use designer with pyqt !

    • @jimhopper5868
      @jimhopper5868 Рік тому +3

      ​@@essetee It's a starting point. The usage may be wrong or industry-standards may be different but made me encouraged.

  • @incremental_failure
    @incremental_failure Рік тому +59

    You should never edit the py files generated with pyuic, it's always expressly warned about both in PyQt and PySide. Always inherit/compose in a separate file.
    Qt itself is fantastic. Basic applications are easy but the different models and mappings for data can get quite complex. It's extremely powerful, more so than any other native frontend builder.

    • @robertfletcher8964
      @robertfletcher8964 10 місяців тому +1

      probably best not to use pyuic at all.

    • @incremental_failure
      @incremental_failure 10 місяців тому

      @@robertfletcher8964 There's a performance penalty if you don't. Best practice is to do everything in Designer as much as possible, not modify the pyuic generated file and do additional things in your app file.

  • @muhtasimahmedtausif2090
    @muhtasimahmedtausif2090 Рік тому +11

    Yes bro we need this kind of video it will help us to contribute in linux

    • @xeiAiex
      @xeiAiex Рік тому +4

      Great... here come more "distros" now with a welcome screen lol

  • @atimagalleries
    @atimagalleries Рік тому +8

    I love PyQt, its great!

  • @norbydroid3430
    @norbydroid3430 Рік тому +6

    This isn’t too different that how things were done back many years ago in Visual Basic and other languages with the difference being that qt designer seems to be just a form designer without having the language included. Here the language is separate. Personaly I have never gotten into visual languages, but those who have should feel right at home with the designer. Thanks dt for showing this.

  • @tailsorange2872
    @tailsorange2872 Рік тому +3

    Hey DT, why are you such a Qutty?!?

  • @code8986
    @code8986 Рік тому +4

    I would definitely be interested in more programming videos, especially if they are in Rust or C#.

  • @fcolecumberri
    @fcolecumberri Рік тому +3

    Couple of things. First, 0:28 When you create the main window, use the "Main Window" not the "Dialog". Second, don't use PyQt, Use Pyside, Pyside is the official Qt python implementation (There is nothing wrong with PyQt perse, it's just that its license is not the same as Qt and with licenses, the less you mix the better). Third, don't edit the file generated by pyuic.

  • @sirrobertdowneysenior8080
    @sirrobertdowneysenior8080 Рік тому +3

    On the point of QT, neovim qt which comes by default in windows while installing neovim takes really looooooooooooooooooooooo opening up dry start is longer than Emacs.

  • @Ax4400
    @Ax4400 Рік тому +2

    Awsome👏👏👏👏 Thank you DT Great video only second to Bash Commands! OMG you made me so happy! Please make more of these videos. Wish I were wealthy I would become a Patreon of such a project

  • @notyoutube8128
    @notyoutube8128 Рік тому +1

    My python scripts never runs, they just crash on start :(

  • @CaribouDataScience
    @CaribouDataScience Рік тому +1

    Say how about interviewing the creater of Slackware?

    • @anon_y_mousse
      @anon_y_mousse Рік тому +1

      As a longtime Slackware user, I'm definitely in favor of that.

  • @benjy288
    @benjy288 Рік тому +3

    I much prefer qt over gtk, gtk is basically run by the gnome project, and we all know what those guys are like, now if only someone would port firefox or librewolf to qt

    • @benjy288
      @benjy288 Рік тому

      @@d4r1us_drk Because gtk basically serves the needs of gnome now, I believe budgie is moving away from gtk because gtk4 did not live up to the expectations of the developers due to the continued focus only on the needs of the gnome project, the developers of which do not listen to the opinions of alternative projects and do not want to take their needs into account.
      Gnome used to be a good desktop until they decided to turn it into a tablet interface, they also dumbed it down by removed a bunch of customization options, yet at the same time making customization possible by third party extensions that break whenever they release a new version.
      Also the gnome project is run by a bunch of woke racists, who for some reason think there needs to be more non white people in software, more woman in software, more gay or trans people in software, which is why they created the program outreachy, where they give grants to people that I mentioned above, so if you're a white man who wants to get into software don't bother applying for a grant at outreachy because you're the wrong skin color and the wrong gender, and that makes you privileged.

  • @splitthh
    @splitthh Рік тому +3

    Hey DT, thanks for this video. Please do more of this kind of stuff. It is great and you are a very good teacher. 🙂

  • @Ex_impius
    @Ex_impius Рік тому +2

    Put another box inside the group box and then edit the buttons to make them all change.

  • @punklejunk
    @punklejunk Рік тому +6

    This is giving major Visual Basic vibes, even more than Gambas, but more modern. Totally takes me back to my VB4 /VB5 days-- this is awesome! Now my family is wondering why I'm grunting like those monkeys in Space Odyssey 2001, but they're not geeks and just won't understand. LoL

    • @SB-qm5wg
      @SB-qm5wg Рік тому +1

      I remember that. And an "Access" backend lol.

  • @fir3w4lk3r
    @fir3w4lk3r Рік тому +2

    Can you generate binary files this way? Like with plain QT?

  • @mk_aquila
    @mk_aquila Рік тому +2

    I've been literally looking for a video like this yesterday and this comes up now on my feed, couldn't ask for a better timing!

  • @theintjengineer
    @theintjengineer Рік тому +1

    I stopped at the Python part. I thought (and hoped) you'd do C++.
    Nice choice of topic though. These GUI Projects are always the best✨
    Cheers

  • @ernstmayer3868
    @ernstmayer3868 Рік тому +1

    What's happening if you need to do changes in the qt layout and already had adjusted code in the py file? There should be a way to preserve the code alterations, shouldn't it?

  • @ozmosyd
    @ozmosyd Рік тому +1

    Excellent jump start into Qt chap. Suddenly seems less daunting. thank you

  • @MadhurAhuja25
    @MadhurAhuja25 Рік тому +4

    Thats great. Can you do similar video for GTK app ?

  • @besnikrrustemi
    @besnikrrustemi Рік тому +1

    Thanks DT, perfect timing for this, i am learning Python and i am set with Qtile, it helped me improve my setup a lot, this type of application is just what i needed to further improve.
    DTOS is gradually becoming a unique non-iso distribution

  • @muddyexport5639
    @muddyexport5639 Рік тому +1

    Thanks! Good job and info! Appreciate the work.

  • @MadhurAhuja25
    @MadhurAhuja25 Рік тому +1

    This reminded me of Microsoft Visual Basic

    • @guilherme5094
      @guilherme5094 Рік тому +1

      👍That's exactly what I was going to say!

  • @itsabhiyan
    @itsabhiyan Рік тому +4

    DT: builds a qt application
    Also DT: "I am not a programmer"

  • @EstebanLopez-bn9pd
    @EstebanLopez-bn9pd 7 місяців тому

    Are going to explore QML at some point? Because that would be awesome!

  • @Sam-n6v1s
    @Sam-n6v1s Рік тому +1

    this is rlly cool

  • @gary3548
    @gary3548 5 місяців тому

    Hi there, It would be helpful if you linked to the sites where you could download these tools in your description

  • @chenalice-co3mh
    @chenalice-co3mh Рік тому +1

    how can we contact you for cooperation?

  • @slendi9623
    @slendi9623 Рік тому +5

    You can just drop all your widgets at once, selecte them, and use the buttons at the top to put them in a layout. If you have nothing selected then those buttons set the root layout iirc

  • @burningpho3nix
    @burningpho3nix Рік тому +1

    Can you make one with C?

    • @anon_y_mousse
      @anon_y_mousse Рік тому

      Using GTK instead of Qt? That would be good too.

  • @grahamshackley5941
    @grahamshackley5941 17 днів тому

    Moore Betty Anderson Robert Moore Michelle

  • @karolsott2452
    @karolsott2452 11 місяців тому

    What QT Designer version is this? I cannot find anywhere on the internet information how you can save projects as *.ui. I have QT 4.3.1 and only save option is to *.ui.qml...

  • @Tyler-Kearney
    @Tyler-Kearney Рік тому

    Would this be similar if I wanted to use a different language such as JavaScript, Ruby, or C?
    I know the default language for Qt if you use their main tool, QtCreator (different from designer) is C++, but I’m not a fan of C++.

  • @danieleg8758
    @danieleg8758 Рік тому

    Damn... another cool and interesting video from DT. I definitely try this one. I can see myself very busy in the next few weeks... I think I start to hate you DT :-)

  • @minivini-ps5xc
    @minivini-ps5xc 3 місяці тому

    is the code available somewhere please?

  • @guilherme5094
    @guilherme5094 Рік тому +1

    👍Thanks.

  • @anon_y_mousse
    @anon_y_mousse Рік тому

    You should do one for C++ using kdevelop. Would be quite useful for anyone wanting to get into games development. Also, is it supposed to be pronounced "cute" or "cutie", because I've always treated it like an acronym and said Q.T. as "cutie". Is that wrong?

  • @parthparmar9798
    @parthparmar9798 Рік тому

    This feels like Visual basic used for designing Windows apps when bill gates not even born

  • @fleshwound8875
    @fleshwound8875 Рік тому

    Its always been easy just dont be a baby lol ;P

  • @DHealey
    @DHealey Рік тому

    Reminds me of Visual Basic 6

  • @RyanJensenEE
    @RyanJensenEE Рік тому

    How do qt applications scale with DPI settings?

  • @jakjustanotherkomment930
    @jakjustanotherkomment930 Рік тому

    Gambas and Lazarus are also cool IDEs to play with!

  • @ikestoddard2458
    @ikestoddard2458 Рік тому

    Is there a doc with a good explanation of the design approach?

  • @stephenscopatz6675
    @stephenscopatz6675 Рік тому

    I am following all this, I get my .ui converted to .py; I go to run it but all I get is a command line message that there were no errors. I did not get my ui showing up anywhere on my screen. I am sure I missing something simple.

  • @osamaanees8406
    @osamaanees8406 Рік тому +4

    This helped me in my University project. Our Lab Professor told us to make a graphical app which can compute people's Grades. We were given a junior class's actual result which was a .csv file. Whats funny is the university never taught us how to build graphical apps. Thanks to Qt designer and pyQt I was able to complete it. There is just one thing that I could not figure out. How can I make the app dynamic or responsive like in websites. Different resolutions made the app look very small or very big.

    • @EUXINOS
      @EUXINOS Рік тому +3

      use multi threading, that way the computation happens in a separate thread and the UI remains responsive

  • @BelallGamall
    @BelallGamall Рік тому

    thank youuuuuuu

  • @s1nistr433
    @s1nistr433 Рік тому

    I tried Qt in the past. It's functionally really good but the problem is the forced LGPL dual licensing and how vague they are with it. You either release your program for free, pay a massive license fee that no solo dev/small team will be able to pay, or do some weird dynamically linking stuff that they aren't specific about at all. I like Qt but understand why companies usually just use Electron

    • @yellingintothewind
      @yellingintothewind Рік тому +3

      The licensing is not a major issue. Much of what you use on Linux is (L)GPL anyway. Anything you write _using_ qt, so long as it is not statically linked to qt, is fine. It can even be statically linked, and under a restrictive license, so long as you make object code or source code available so the recepient can swap in their own version of the qt portion. This is the same as any other LGPL project, and not an issue at all.
      What the alternate qt license allows is companies to ship _modified qt_ libraries, where they apply some secret patches to qt itself, without publishing those patches anywhere. Given the flexibility and feature state of qt, this is basically not _required_ for anything, but it does let you ship a single-file-executable that embeds qt, without needing to worry about library versions or if the end user has qt installed.
      For anyone actually supporting linux, instead of just looking for a toolkit that can run anywhere, requiring the user to have qt installed from their distro is not a significant issue. Just list (py)qt (or pyside) in your package's deps, and move on. Or embed the qt .so files in your appimage and move on.

    • @anon_y_mousse
      @anon_y_mousse Рік тому

      @@yellingintothewind Agreed. While I hate the GPL and refuse to use it for my own projects, it's not a huge issue to use libraries under it. Also, the fact that they have two licenses actually makes it a good thing for a business because they can basically pay to avoid the GPL altogether.

    • @yellingintothewind
      @yellingintothewind Рік тому +1

      @@anon_y_mousse Exactly. For a project like qt, the GPL is a good choice specifically because it is mildly annoying to use for a few things. If you fall into those few things, then you'll be happy to pay them to just forget about it.

  • @Dampferfrosch
    @Dampferfrosch Рік тому

    thanks

  • @mufeedco
    @mufeedco Рік тому

    Thank you.

  • @SB-qm5wg
    @SB-qm5wg Рік тому

    Very cool!

  • @watashimax
    @watashimax Рік тому

    you are qute

  • @bigmikeobama5314
    @bigmikeobama5314 Рік тому

    Hey DT

  • @mzakyr342
    @mzakyr342 Рік тому

    lets gooo

  • @christer8964
    @christer8964 Рік тому +1

    Yes, more of this.
    Have you checked out Ragnar WM?
    A new tiled WM, based on example code. Always nice with programming package you can quickly reach impressive results.

  • @adrianmares269
    @adrianmares269 Рік тому +1

    I was hoping to get a tutorial on Qt 🎉 thanks

  • @essetee
    @essetee Рік тому +1

    It's the wrong way to use Designer. And for your icons you need to create a resource file. You put all your buttons wherever you want. Choose 1 button. Hold down the ctrl key and choose other buttons. Then click in the top bar on the layout you want. Do this for all your items. If you choose your groupbox, choose button 1 and 2 and choose H layout. Then the second row. Then click in your groupbox and choose V layout. That way if you change the size of your window, all with follow. Never change the pyuic file ! You have to do the layout in Designer. This is a very bad video to show how to use Designer and PyQt. You create a dialog and you remove the buttons. Choose the right one from the create menu!

  • @dod_ytent9984
    @dod_ytent9984 Рік тому +1

    The way we are moving ahead with the videos, DTOS doesn't seem very fictional. You may try to do it keeping the default Arch repos, just saying out loud what all your viewers are thinking. ❤

  • @DoeJohn-gx1qb
    @DoeJohn-gx1qb Рік тому +1

    Distrotube race was black yesterday..... But today he is white what happend?

  • @-Engineering01-
    @-Engineering01- Рік тому

    No need for Qt etc. Now we have web technologies like electron, making a UI with CSS is so much easy thanks to tailwind and bootstrap, if performance matters then you have web assembly.