- User Interfaces
- pyVCP
- How to add a QtWidgets.MainWindow instance as an additional tab to the Axis UI
How to add a QtWidgets.MainWindow instance as an additional tab to the Axis UI
- BaxEDM
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 29
- Thank you received: 10
05 Mar 2023 13:10 - 05 Mar 2023 13:13 #265911
by BaxEDM
How to add a QtWidgets.MainWindow instance as an additional tab to the Axis UI was created by BaxEDM
Hi,
I'm new to making custom UI's for linuxcnc, but experienced in making UI's with PyQt. I have a custom class that inherits from QtWidgets.MainWindow and I am looking for an example how I can add this "testui.py" as an additional tab to the existing Axis UI. I've been searching and can find examples of making entire screens, but cannot find an example how to just add a tab (with Qtvcp at least).
ChatGPT gave me a bunch of suggestions and I tried them all without success.
I'm new to making custom UI's for linuxcnc, but experienced in making UI's with PyQt. I have a custom class that inherits from QtWidgets.MainWindow and I am looking for an example how I can add this "testui.py" as an additional tab to the existing Axis UI. I've been searching and can find examples of making entire screens, but cannot find an example how to just add a tab (with Qtvcp at least).
ChatGPT gave me a bunch of suggestions and I tried them all without success.
Last edit: 05 Mar 2023 13:13 by BaxEDM.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7769
- Thank you received: 2053
05 Mar 2023 15:58 #265922
by cmorley
Replied by cmorley on topic How to add a QtWidgets.MainWindow instance as an additional tab to the Axis UI
use Qtvcp to build your window then use something like this:
This shows how to add cam_align to AXIS.
These is a sample config under axis/qtvcp/qtvcp_tabs
[DISPLAY]
# Embed tabs
EMBED_TAB_NAME= qtscreen
EMBED_TAB_COMMAND= halcmd loadusr -Wn qtvcp_embed qtvcp -q -c qtvcp_embed -x {XID} cam_align
This shows how to add cam_align to AXIS.
These is a sample config under axis/qtvcp/qtvcp_tabs
[DISPLAY]
# Embed tabs
EMBED_TAB_NAME= qtscreen
EMBED_TAB_COMMAND= halcmd loadusr -Wn qtvcp_embed qtvcp -q -c qtvcp_embed -x {XID} cam_align
Please Log in or Create an account to join the conversation.
- User Interfaces
- pyVCP
- How to add a QtWidgets.MainWindow instance as an additional tab to the Axis UI
Time to create page: 0.089 seconds