How to add picture graphic image to gui qtpyvcp
- aleksamc
- Topic Author
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
I add it to recources file. Inside resources file I have
<RCC>
<qresource lang="all" prefix="images">
<file>help_stone.png</file>
</qresource>
</RCC>
I tried 2 methods with Label:
1) In QSS stylesheet:
image: url(":/images/help_stone.png");
Both ways picture adds to QT Designer and it seen. But When I run linuxcnc, place where picture should be is blank.
What I do wrong? I see other configurations has picture and they are even can rotate (for example tool change), but I'm stuck on so basic problem:side:
Please Log in or Create an account to join the conversation.
- aleksamc
- Topic Author
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
I saw a lot of QtPyVCP guis and they had graphic, I don't know what I'm doing wrong.
Please Log in or Create an account to join the conversation.
- Lcvette
- Away
- Moderator
- Posts: 1201
- Thank you received: 619
adding graphics requires the graphics to be in a directory specified for images with the correct path, you also need to add the image file path to the .qrc file, then you need to compile.It's realy nobody knows what problem is?
I saw a lot of QtPyVCP guis and they had graphic, I don't know what I'm doing wrong.
Attachments:
Please Log in or Create an account to join the conversation.
- aleksamc
- Topic Author
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
I wrote in terminal:
qcompile stonecnc
Compiling .ui files in package 'stonecnc':
mainwindow.ui => mainwindow_ui.py ... ok
Compiling .qrc files in package 'stonecnc':
resources.qrc => resources_rc.py ... ok
My file qrc
But when I run linuxcnc I don't see any picture. Could be problem with Language settings?
Attachments:
Please Log in or Create an account to join the conversation.
- Lcvette
- Away
- Moderator
- Posts: 1201
- Thank you received: 619
Unfortunatly doesn't work:
I wrote in terminal:qcompile stonecnc
Compiling .ui files in package 'stonecnc':
mainwindow.ui => mainwindow_ui.py ... ok
Compiling .qrc files in package 'stonecnc':
resources.qrc => resources_rc.py ... ok
My file qrc
But when I run linuxcnc I don't see any picture. Could be problem with Language settings?
hmmm, not sure it should be working, how are you inserting the image into the ui?
Please Log in or Create an account to join the conversation.
- aleksamc
- Topic Author
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
I explained it in the 1-st topic.
Please Log in or Create an account to join the conversation.
- Lcvette
- Away
- Moderator
- Posts: 1201
- Thank you received: 619
Please Log in or Create an account to join the conversation.
- aleksamc
- Topic Author
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
Please Log in or Create an account to join the conversation.
- Lcvette
- Away
- Moderator
- Posts: 1201
- Thank you received: 619
Please Log in or Create an account to join the conversation.
- aleksamc
- Topic Author
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
But in Linuxcnc it's blank.
So linuxcnc is 2.8.1 version
and QtDesigner version is 5.11.3 as same as Qt.
All plugins are run except libpyqt5_py3.so
Could you add here some of yours picture that I could try to add and to see if problem is not in file?
Please Log in or Create an account to join the conversation.