ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

snapshot for January 2020
‹ January 2020 ›×
28 January 2020
C
need to go soon, but in any case I will leave you then the two options you have to add the code: * you can add just the code of the example inside the directory pyside-setup/examples you create three levels more with this name quick/customitems/painteditem/ and place the code there. * this one is more tricky, because you will need to adopt what is being presented here: https://codereview.qt-project.org/c/pyside/pyside-setup/+/285647 and do the same for your specific case. I recommend you the first one, so then we can try to modify the page easily afterwards
J
does I have to add the copyright at the beggining like other files ?
let me send you an example
there you can copy paste the one for the qml file and the python file
C
(change the copyright to 2020 also
29 January 2020
M
Quick question: do shiboken generated libraries work on pypy?
is version of pyside2 corresponds to used Qt version ?
I
if i use pyside2 5.14 then it uses Qt 5.14, right ?
C
That's why there are two versions on the wheel name
But you can also try
30 January 2020
I've previously talked about what could/should be in the doc. A main issue for me was testing. Please let me share my experience about it. - I 'm only talking about the qml side for a pyside user. python testing is very simple and pytest-qt great - QtTest is very good but the doc is not clear (example are two simple). It needs a complex example on how to write tst_files (but it's more qt.io than pyside problem). - about the issue to run the tests. I tested qmltestrunner and running tests with C++. They are not equivalent. some tests are passing with c++ but not with qmltestrunner. - So I've chosen to use C++: It's very simple. I have no knowledge in c++.it only needs 2 files: qml_tests.pro CONFIG += warn_on qmltestcase TEMPLATE = app SOURCES += \ main.cpp RESOURCES += \ ../../src/main/resources/qml.qrcand the c++ main.cpp : #include <QtQuickTest/quicktest.h> QUICK_TEST_MAIN(example) - Then it needs qmake but as python user pip is your friends : pip install aqtinstall. It's a wrapper to install qt with python. - install qt: `aqt install 5.14.0 linux desktop --outputdir Qt - then configure test : Qt/5.14.0/gcc_64/bin/qmake -o Makefile qml_tests.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug make -C target/qml_tests- run the tests: ./target/qml_tests/qml_tests And that's it !!! I put all these commands in a Makefile next to install, dev, run_pytest... and it works like a charm.
J
And I forgot another the thing: the way howto mock Python classes that cannot be injected in QML. it's not a big deal but for noobs it's not straightforward
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog