Working With Qt Designer's UI Files And PyQt

Working With Qt Designer's UI Files And PyQt

DistroTube

1 год назад

16,840 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@vladimirkraus1438
@vladimirkraus1438 - 26.03.2024 15:50

After some 12 years of professional Qt development, I cannot emphasize it louder: For God's sake never ever start with QtDesigner. I beg you, avoid it like plague. That tool is total crap and has so many limitations which you will find too late after investing so much time. It is always much much easier to create your UI in code. QtDesigner makes your code much harder to maintain and much slower to write.

There are only two usecases where QtDesigner is justifiable:
a) used by a complete beginner who is just exploring what Qt framework can do
b) someone who designs a STATIC form AND wants to customize it with lots of stylesheets and want to see the result in a kind of WYSIWYG editor

In all other cases it is much better to write widgets in code.

Ответить
@PANDURANG99
@PANDURANG99 - 22.10.2023 19:28

Qt designer is not free

Ответить
@user-xf6ef8ec4z
@user-xf6ef8ec4z - 28.09.2023 19:12

I like to name like this: (assuming a button) btn_button_name.

That way if I forget what the button is called it's very easy to bring up the autocomplete and see a list of every button just by typing "btn". I find it much easier to remember the type of control I'm looking for instead of the name and once I narrow down the lists to types it's usually pretty obvious which specific buttons (or other types) I'm looking for.

Ответить
@bechirzouaoui5821
@bechirzouaoui5821 - 10.09.2023 18:23

what kinda OS are you using ?

Ответить
@leontalkdaliy5894
@leontalkdaliy5894 - 05.08.2023 03:31

you and your custom linux are fuking amazing.

Ответить
@neotwenty-nineBzH
@neotwenty-nineBzH - 29.07.2023 13:06

Hello DT. Is your code on line on your gitlab? 😊

Ответить
@fir3w4lk3r
@fir3w4lk3r - 26.07.2023 11:35

"Python is a real language". :P :P :P

Ответить
@munir2010able
@munir2010able - 25.07.2023 23:32

What was the rufi them u where using for your search. Loved the sound effect too

Ответить
@jackkeifer
@jackkeifer - 25.07.2023 21:13

1st Class tutorial. Nicely done Derek! Qt & I go back well over 15 years (C++ & Qt Creator), and pyQt maybe 8 years give or take... it just never gets old!

Ответить
@fcolecumberri
@fcolecumberri - 25.07.2023 19:19

You don't need to connect the signal and the slot, if you name your function "on_<object>_<signal>" in this case "on_one_btn_clicked" qt connect them automatically, this is nice because enforces consistency among multiple programmers and avoid bloat on the code.

Ответить
@rawmaterials3909
@rawmaterials3909 - 25.07.2023 19:17

I'm trying to dig into python and qt because I want to write an application. So, to sum it up... this method is preferred because:
1) you don't generate a bloated ui file
2) you can make changes on the fly without having to rebuild the ui file

is that correct? so, does the method DT showed in the previous video has its advantages?

Btw, thanks as always for your videos DT, you're the best!

Ответить
@essetee
@essetee - 25.07.2023 18:22

just rename your buttons the other way. btn_one ... With intellisense when you hit bt all your buttons are grouped together to choose the one you want.

Ответить
@merthyr1831
@merthyr1831 - 25.07.2023 17:35

If you want a python script to run in headless mode (w/o console output) you can change the extension to .pyw instead of .py. Obvs your xmonad hides that stuff anyway but might be good for hiding your script's console output from your users.

Ответить
@hexisXz
@hexisXz - 25.07.2023 16:53

This should be a series.

Ответить
@ZeStig
@ZeStig - 25.07.2023 16:46

Really nice video DT!

Ответить
@sausix
@sausix - 25.07.2023 16:43

Why not using PySide which is an official Qt project and probably has more maintainers? The interface and syntax is similar and even more pythonic.
Loading ui files directly is easier. Only disadvantage is not having a py file for type hints and annotations. But do vim users even know what they're missing 😀

Ответить
@jcugnoni
@jcugnoni - 25.07.2023 16:30

qt designer and PyQt are great; but I don't really like using pyuic and prefer to import .ui files at runtime. Indeed, it gives a better separation between the UI and the code and is simpler to maintain over time. Of course, this is only usefull if we use Qt Designer.. Direct coding the ui in PyQt is also a option but I usually find it frustrating...

Ответить
@_..-_-.._
@_..-_-.._ - 25.07.2023 16:08

u mean dtos spin not distro

Ответить