3 July 2020
there is only 1 method, that was asked from the folks at pyqtgraph, that we added, the loadUiType https://doc.qt.io/qtforpython/PySide2/QtUiTools/ls.loadUiType.html
Ссылка
click to show
click to show
and for just "loading" ui files into your scripts, we have this tutorial of two ways to do: https://doc.qt.io/qtforpython/tutorials/basictutorial/uifiles.html
Cristián 🥑otherwise, why generating the physical files from within the code?
* to have the compilation only once on change
* so I'll be able to see how things are set up
* to learn how Qt for Python is programmed
* to spot any mistakes made in Designer from the resulting code
So. A man is unhappy with uic Python code quality... What does he do?
I guess as this is not a "blocker" it would not be a priority to fix officially.
So: I'm thinking about working on it myself. But then: Is there reason to believe that this kind of "beautifications" will ever make it into the real thing?
Cristián 🥑what is the problem with the uic python code?
pylint makes it blink like a Christmas tree.
The docstring is big #-comment-block instead of """docstring"""
There are all these unused from Pyside2.QtCore imports,
since Python 3 simple should be written without (object): class Ui_Form:
when there are QTableWidgets the if clauses are in (parenthesis)
the naming style could be more pep8-ish: setup_ui, retranslate_ui
I'd actually like to inject some # pylint: disable=W0201,C0103,C0111'
2 blank lines in the end ...
FreyaWhy not just exclude those files from pylint?
because some people want to have nice code in their projects.
ëRiCbecause some people want to have nice code in their projects.
I'm part of that set of people, but I don't mind much about generated code
FreyaWhat's up with the constant passive-aggressiveness?
😮 pardon me. I didn't want to sound like that!
ëRiCWell IF you could have generated code to be beautiful? Wouldn't you rather have that instead of making your linter look away completely?
I really meant that as a valid question. Sure its phrasing in the end was bad. I apologize 😔
FreyaWhy not just exclude those files from pylint?
I found that more offensive than it was in that moment. You probably didn't mean to either.
Here you can find some notes how to get started: https://wiki.qt.io/Qt_for_Python/Development_Getting_Started
mainly you need a qt account and register the same email on gerrit.