how to make my own custom page for qtdragon_hd?
24 Apr 2023 22:36 #269792
by cmorley
Replied by cmorley on topic how to make my own custom page for qtdragon_hd?
couple of things:
can you open a terminal and type qtvcp -d NAME_OF_YOUR_PANEL
no .ui or .handler ending.
See if it finds it and displays without the main screen.
also what command are you using to load it in the INI
I pushed a simple_hal panel example to 2.9 just now.
it has a few basic HAL widgets and no handler file.
looks like i have some work to do to make this process 'user proof'
I just happen to be away working long nights shifts so have limited time to help for a week or so.
Chris
can you open a terminal and type qtvcp -d NAME_OF_YOUR_PANEL
no .ui or .handler ending.
See if it finds it and displays without the main screen.
also what command are you using to load it in the INI
I pushed a simple_hal panel example to 2.9 just now.
it has a few basic HAL widgets and no handler file.
looks like i have some work to do to make this process 'user proof'
I just happen to be away working long nights shifts so have limited time to help for a week or so.
Chris
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
24 Apr 2023 23:26 - 24 Apr 2023 23:30 #269795
by rodw
Replied by rodw on topic how to make my own custom page for qtdragon_hd?
Chris, Just pulled and recompiled, there must be some sort of bug biting here or I am missing a step. I always get[
Errno 2] No such file or directory: '/usr/share/qtvcp/panels/simple_hal/simple_hal.ui'
I just have to put this in
~/linuxcnc/configs/sim.qtdragon.qtdragon_xyz/qtvcp/panels/simple_hal
Is that right?
I don't understand why it wants to look in the system directory all the time.
Ini file says.
EMBED_TAB_NAME=simple_hal
EMBED_TAB_COMMAND=qtvcp simple_hal
EMBED_TAB_LOCATION=tabWidget_utilities
EDIT: it does open outside of linuxcnc
I realised that you do already have some panels already eg. test_led bit they do the same thing
Errno 2] No such file or directory: '/usr/share/qtvcp/panels/simple_hal/simple_hal.ui'
I just have to put this in
~/linuxcnc/configs/sim.qtdragon.qtdragon_xyz/qtvcp/panels/simple_hal
Is that right?
I don't understand why it wants to look in the system directory all the time.
Ini file says.
EMBED_TAB_NAME=simple_hal
EMBED_TAB_COMMAND=qtvcp simple_hal
EMBED_TAB_LOCATION=tabWidget_utilities
EDIT: it does open outside of linuxcnc
I realised that you do already have some panels already eg. test_led bit they do the same thing
Last edit: 24 Apr 2023 23:30 by rodw.
Please Log in or Create an account to join the conversation.
25 Apr 2023 00:02 #269796
by rodw
Replied by rodw on topic how to make my own custom page for qtdragon_hd?
So I can load it withand query the hal pins with
So there is clearly something amiss with qtdragon or qtvcp logic if its looking in the wrong folder...
halcmd loadusr qtvcp simple_hal
halcmd show pin
So there is clearly something amiss with qtdragon or qtvcp logic if its looking in the wrong folder...
Please Log in or Create an account to join the conversation.
25 Apr 2023 02:49 #269800
by rodw
Replied by rodw on topic how to make my own custom page for qtdragon_hd?
So I have taken your simple_hal example and modified it to suit my needs. Thanks. It was great to have a working example to modify.
I've used two groups of buttons so the columns are mutually exclusive but I need to ensure that if a button is selected, the one beside it is disabled. I'm assuming a handler is required to do this so a simple template would be great! I've only ever modified handlers before, its not clear to me how to lay it out. The current examples seem too complicated for a hello world example that simple_hal provides.
then styling to qtdragon and sort out the original problem of loading it into qtdragon.
I've attached the panel I'm working on if its of interest.
I've used two groups of buttons so the columns are mutually exclusive but I need to ensure that if a button is selected, the one beside it is disabled. I'm assuming a handler is required to do this so a simple template would be great! I've only ever modified handlers before, its not clear to me how to lay it out. The current examples seem too complicated for a hello world example that simple_hal provides.
then styling to qtdragon and sort out the original problem of loading it into qtdragon.
I've attached the panel I'm working on if its of interest.
Please Log in or Create an account to join the conversation.
25 Apr 2023 04:45 #269807
by cmorley
Replied by cmorley on topic how to make my own custom page for qtdragon_hd?
Ok Rod please pull again.
Problem was on my end - I guess I never tested custom panels as embeds.
make a folder as such (custompanel can be any name you like):
INI_FOLDER/qtvcp/panels/custompanel/
add custompanel.ui
add custompanel_handler.py if needed
for exclusive toggle buttons set the exclusive and checkable properties on both buttons.
There is away to make groups so you can have separate groups of exclusive toggle buttons but I forget at the moment how to do it.
Thanks for sticking with this
Chris
Problem was on my end - I guess I never tested custom panels as embeds.
make a folder as such (custompanel can be any name you like):
INI_FOLDER/qtvcp/panels/custompanel/
add custompanel.ui
add custompanel_handler.py if needed
for exclusive toggle buttons set the exclusive and checkable properties on both buttons.
There is away to make groups so you can have separate groups of exclusive toggle buttons but I forget at the moment how to do it.
Thanks for sticking with this
Chris
Please Log in or Create an account to join the conversation.
25 Apr 2023 04:50 #269808
by cmorley
Replied by cmorley on topic how to make my own custom page for qtdragon_hd?
group boxes was what I was thinking for toggle buttons.
for radio buttons you right click and can select/make a group
here is a sample
for radio buttons you right click and can select/make a group
here is a sample
Please Log in or Create an account to join the conversation.
25 Apr 2023 06:43 #269814
by rodw
Replied by rodw on topic how to make my own custom page for qtdragon_hd?
Chris, still got problems. Behaviour is unchanged
This time I remembered to checkout 2.9!
There are a lot of conv_x64 componets not compiling but I deleted them to build
This time I remembered to checkout 2.9!
There are a lot of conv_x64 componets not compiling but I deleted them to build
Warning: Spoiler!
[QTvcp][CRITICAL] Aborted from Error Dialog
Qtvcp encountered an error. The following information may be useful in troubleshooting:
LinuxCNC Version : 2.9.0-pre1-683-g5585d6c36
Traceback (most recent call last):
File "/usr/bin/qtvcp", line 509, in <module>
_qtvcp = QTVCP()
File "/usr/bin/qtvcp", line 279, in __init__
self.panel = qt_makepins.QTPanel(self.hal, self.PATH, window, opts.debug)
File "/usr/lib/python3/dist-packages/qtvcp/qt_makepins.py", line 95, in __init__
window[pName].instance(os.path.join(path.PANELDIR , cmd, cmd+'.ui'))
File "/usr/lib/python3/dist-packages/qtvcp/qt_makegui.py", line 382, in instance
instance = uic.loadUi(filename, self)
File "/usr/lib/python3/dist-packages/PyQt5/uic/__init__.py", line 238, in loadUi
return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
File "/usr/lib/python3/dist-packages/PyQt5/uic/Loader/loader.py", line 66, in loadUi
return self.parse(filename, resource_suffix)
File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py", line 1020, in parse
document = parse(filename)
File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 1229, in parse
tree.parse(source, parser)
File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 569, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/qtvcp/panels/simple_hal/simple_hal.ui'
Please Log in or Create an account to join the conversation.
25 Apr 2023 06:45 #269815
by rodw
Replied by rodw on topic how to make my own custom page for qtdragon_hd?
I also went and found your changed files and confirmed the additional code in your commit existed and it did!
Please Log in or Create an account to join the conversation.
25 Apr 2023 06:50 #269816
by cmorley
Replied by cmorley on topic how to make my own custom page for qtdragon_hd?
The error message shows the new code was not run.do you use installed or compiled or both?
Please Log in or Create an account to join the conversation.
25 Apr 2023 06:56 #269817
by rodw
Replied by rodw on topic how to make my own custom page for qtdragon_hd?
Odd. This is a RIP system on Bullseye. I don't have a full desktop on my chromebook so I can't install from debs.
I'll try building it on a real PC.
I'll try building it on a real PC.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.106 seconds