qtvcp issues

  • auto-mation-assist
  • Offline
  • Platinum Member
  • Platinum Member
More
8 years 3 weeks ago - 8 years 3 weeks ago #118659 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris

I did more searching for information and found out that I needed to do the below to to get the search path link for the designer correct.

For my system as root I made a python folder to the designer folder as seen below.
# /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/python
Then opened the newly created python folder and made a link to qtvcp_plugin.py in linuxcnc as below.
# ln ///home/cnc/LC-qt-10-09-2018/lib/python/qtvcp/plugins/qtvcp_plugin.py
Now it shows the qtvcp_plugin.py icon in the newly generated python folder.

When I open the designer I can see the Linuxcnc - Hal, Linuxcnc - Controller and Linuxcnc - Dialogs items in the designer.
Now I have to figure out how to eliminate the "Missing icon for" warnings like three below examples. But there are many more.

Missing icon for 'LCDNumber' widget (qtvcp_icons.py:21)
Missing icon for 'gcodegraphics' widget (qtvcp_icons.py:21)
Missing icon for 'camviewdialog' widget (qtvcp_icons.py:21)

In the file list for qtvcp that I made I only see the below and wonder if that folder should not contain more icons.

/lib/python/qtvcp/widgets/widget_icons/dro_label.png
/lib/python/qtvcp/widgets/widget_icons/graphics.png
/lib/python/qtvcp/widgets/widget_icons/led.png
/lib/python/qtvcp/widgets/widget_icons/linuxcnc-wizard.gif
/lib/python/qtvcp/widgets/widget_icons/originoffsetview.png
Last edit: 8 years 3 weeks ago by auto-mation-assist. Reason: Added found icon listing /lib/python/qtvcp/widgets/widget_icons/

Please Log in or Create an account to join the conversation.

More
8 years 3 weeks ago #118662 by cmorley
Replied by cmorley on topic qtvcp issues
Auto-mation-assist:

Warnings about icons can be ignored - as you found there are only a few present - i am not good at icons :)

QT uses what's called 'styles sheets' for changing colors and stylizing widgets.
For Qtvcp there is a separate file that holds all the CSS style definitions.
I have not found an easy way to get Designer to use a separate style sheet.
So in general, I build a screen using the default style and then when I'm happy with it, i build a stylesheet for it. that 's why they don't look the same in Qt Designer vrs QTvcp.

The estop button in Blender doesn't show because the path to the image uses absolute paths (and so has my personal path) I need to look into getting relative paths to work.

Chris M

Please Log in or Create an account to join the conversation.

  • auto-mation-assist
  • Offline
  • Platinum Member
  • Platinum Member
More
8 years 2 weeks ago #118745 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris,

I have started developing my custom gui with QTvcp it's coming along well. I would like to be able to have separate text labels for the on and off state of some buttons, like inch/mm swapping for the the dro displays. I have not been able to find a way to do that within the QT designer under QAbstractButton "test" entry. Have you found a way to do that? I’m wondering if this is perhaps something that styles sheets handle.

I think that it may be beneficial to start a new thread like "QTvcp Development Work" or something like it.

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #118749 by cmorley
Replied by cmorley on topic qtvcp issues
Well I looked into this and it should have been easy with stylesheets....
But it didn't work like it should have.

I will look into coding the capability into buttons tonight.

Chris M

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #118756 by cmorley
Replied by cmorley on topic qtvcp issues
Ok I pushed some work on this.
If you try and pull this:
(while in your qt5vcp_py2 branch)
git pull

you will get a warning message about conflicts.
This is because I rebased it over the latest master.

As long as you have not changed any linuxcnc code type this:
(your GUI code should be fine but i would copy it somewhere anyways)

git reset --hard origin/qt5vcp_py2

Then you should be up to date.

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #118757 by cmorley
Replied by cmorley on topic qtvcp issues
So I added options on the action button for text toggling.
Right now the button must be a checkable button.
You set that under QAbstactButton on the right hand property editor.

Then under the Indicator_PushButton on the right side property editor:
check the checked_state_text_option button and the set the textboxes in
true_state_string and false_state_string to the text you wish to toggle.

You can confirm it works by going back to the QAbstractButton heading and then
check/uncheck the 'checked' button; the text in the button should change.

If all good save and start linuxcnc with your new GUI and test.

If you wish to change font/font size/ colors that would be done with stylesheets.

stylesheets can be set from designer on widgets by right clicking the widget and selecting 'change stylesheet'
You can see this on the 'qtdefault' test screen for instance the ESTOP button.

stylesheets are a subject all to them selves...

Hope this helps

Chris M

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 1.903 seconds
Powered by Kunena Forum