ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

8 November 2021
2021-11-08×
8 November 2021
Фотография
click to show
Works fine with 6.1.x and does not work with 6.2.1
M
Фотография
click to show
Фотография
click to show
Hey guys. The same code on different platforms and differ
image defined via file in .ui does not appear in linux (fedora+gnome)
I couldn't find an explanation for this. Is it the python version? The pyside6 version is the same
I thought it was something related to how Windows and Linux handle paths, but to no avail, the result is always the same
R
I updated the version of python in window and left the same as linux and it worked, presented the image
Ë
well thats the thing with "loading" a ui. on the fly. There is no proper way to debug :/
R
on Linux it didn't work, the image is not found by the path specified in the ui file. mwsmo converting .ui to .py the image is not shown
I'd always recommend to compile into a dedicated python file and have that imported so you can step through when things like thse happen
R
with pyqt the loading of images works, both loading the .ui and compiling in .py. It concludes that the way pyside and pyqt handle directories are different
Ë
well basically the resulting code shouldn't be platform specific. You should be able to use the same file on Linux! But what is the problem on Linux anyway? Whats wrong with using uic there?
Is your project environment set up the same way on both platforms?
when you get os.getcwd() and sys.path these should be the same.
I mean, seeing the same either on Win or Linux
Ë
If the paths your Python env sees are the same and yet this yields different results. The PySide devs are probably happy about a bug report with an example to illustrate the problem
M
So i give the application path to all my files
Only if I manually edit the path of all images
Фотография
click to show
keeping the path generated by pyside6-uic the icon does not appear
Фотография
click to show
making the manual change works
Файл
pyside6-test-icon.zip · 9 KB · click to show
R
I don't believe it's normal pyside behavior
M
But you're still using local path, I have done a absolute path to all files with the application path I had the same problem with MacOS as I said
I don't use the qt designer, I create the UI by hand but I use this in QML: "file:///" + applicationDirPath +"/images/svg/menu_icon.svg"
M
In the screenshots above you see how i build the applicationDirPath
R
either way I will have to manually change each image on my system with pyside6 for linux
Calendar: November 2021
Archive by month
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