Couple questions about QTPYVCP

More
15 Feb 2019 10:18 #126528 by andypugh
I can't stop myself, I now always read this as "cutie pie VCP"
The following user(s) said Thank You: tommylight, rodw, KCJ, Leon82

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

More
15 Feb 2019 10:53 #126531 by BigJohnT

Where can I find example s of bool expressions? The docs on the page show mostly strings.

This doesn't really serve a practical function but I want to use status: joint[0]. in position.

I want it to flash false and turn on when true


A bool is just 0 and 1, you can convert a bool to a string like this str(ch[0]) and it will show True or False.

JT
The following user(s) said Thank You: Leon82

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

More
15 Feb 2019 13:48 #126540 by Leon82

I can't stop myself, I now always read this as "cutie pie VCP"


I thought I spelled it wrong at first. But it does work. lol

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

More
15 Feb 2019 15:18 #126552 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP

I can't stop myself, I now always read this as "cutie pie VCP"


From the QtPy Docs: "QtPy (pronounced ‘cutie pie’) is a small abstraction layer that lets you write applications using a single api call to either PyQt or PySide."

So it is indeed cutie pie VCP! I should add a pronunciation guide to the docs, lol.
The following user(s) said Thank You: tommylight

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

More
16 Feb 2019 20:48 #126622 by Leon82
how does one go about refreshing the tool table widget?

it updates when you restart the machine.

i found this
qtpyvcp.kcjengr.com/plugins/tool_table.html

but im kind of lost. it looks like its another file that would have to be edited

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

More
16 Feb 2019 22:57 #126626 by Leon82
here are a couple more pics

Attachments:

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

More
16 Feb 2019 23:31 - 16 Feb 2019 23:37 #126628 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP
That looks great!

The tooltable widget has slots for re-reading, saving, adding/removing tools etc. You can connect the slots to buttons (or other widgets) in designer, or you can call them directly from python code.

Here is a gif showing how to open the signals and slots editor in designer and connecting a button to the tooltable widgets loadToolTable slot.



There is a tool-table.ui file in the examples folder. You can open it in designer by running editvcp in a terminal and then browsing to the qtpyvcp examples folder. You can run it by selecting Open File from the VCP Chooser dialog and browsing to the examples folder.
Attachments:
Last edit: 16 Feb 2019 23:37 by KCJ.
The following user(s) said Thank You: Leon82

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

More
16 Feb 2019 23:37 - 17 Feb 2019 01:18 #126630 by Leon82

That looks great!

The tooltable widget has slots for re-reading, saving, adding/removing tools etc. You can connect the slots to buttons (or other widgets) in designer, or you can call them directly from python code.

Here is a gif showing how to open the signals and slots editor in designer and connecting a button to the tooltable widgets loadToolTable slot.


thanks!, ill check it out
IT worked good.
my icons are different than yours.

is there a way to shift the columns around?
Last edit: 17 Feb 2019 01:18 by Leon82.

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

More
17 Feb 2019 03:26 - 17 Feb 2019 03:31 #126650 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP
You can specify which columns the tool table data plugin uses and the order in the VCPs YAML config file. The plugin is what actually reads and writes the tooltable file, so while this will change the columns displayed in the widget, it will also effect which columns are saved when the tooltable is written, which might not be desirable. I guess what I really need to do is make the display columns configurable in the tooltable widget at well.

Here is an example of what you could add to you config.yml file to customize the columns used by the plugin.
dataplugins:
  tooltable:
    kwargs:
      columns: PTDZR

I added some more info to this page: qtpyvcp.kcjengr.com/plugins/tool_table.html

KCJ
Last edit: 17 Feb 2019 03:31 by KCJ.
The following user(s) said Thank You: Leon82

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

More
17 Feb 2019 03:31 #126651 by Leon82
Thanks, I'll take a look.

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

Moderators: KCJLcvette
Time to create page: 0.297 seconds
Powered by Kunena Forum