How to add a QtWidgets.MainWindow instance as an additional tab to the Axis UI

More
05 Mar 2023 13:10 - 05 Mar 2023 13:13 #265911 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.
Last edit: 05 Mar 2023 13:13 by BaxEDM.

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

More
05 Mar 2023 15:58 #265922 by cmorley
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

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

Time to create page: 0.072 seconds
Powered by Kunena Forum