- Posts: 425
- Thank you received: 81
qtvcp issues
- auto-mation-assist
- Offline
- Platinum Member
-
Less
More
8 years 2 weeks ago - 8 years 2 weeks ago #118919
by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I used the Linuxcnc-Controller area (StatusStacked) and hoping that there would be no issues in getting some of my buttons to open up a particular page in a particular named stack by "stack name" and "index number".
If I need to I can change them to the QT Containers Stacked Widget type.
My stacked page names (changed from all being: ("statusstacked") are as below with each stack now starting at index 0.
stacked_frame_0
stacked_frame_1
stacked_frame_2
stacked_frame_3
If I need to I can change them to the QT Containers Stacked Widget type.
My stacked page names (changed from all being: ("statusstacked") are as below with each stack now starting at index 0.
stacked_frame_0
stacked_frame_1
stacked_frame_2
stacked_frame_3
Last edit: 8 years 2 weeks ago by auto-mation-assist.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
8 years 2 weeks ago #118922
by cmorley
Replied by cmorley on topic qtvcp issues
Yes I think you'll need to change them. StatusStack widgets are specifically used to switch automatically to linuxcnc mode state.
I just pushed some more work on action buttons so they can run python code.
So if you want to switch a stackwidget or a tab widget with a button press...
add a default stackwidget and fill the pages as you like. name it something helpful - say stack_frame_0
add enough action buttons to cover all the pages you want to select.
select python_command_action on each action button.
under the false_python_cmd_string add this:
INSTANCE.stack_frame_0.setCurrentIndex(0)
but on each button use a different page index number. index start at zero and go up
That should do it.
Chris M
I just pushed some more work on action buttons so they can run python code.
So if you want to switch a stackwidget or a tab widget with a button press...
add a default stackwidget and fill the pages as you like. name it something helpful - say stack_frame_0
add enough action buttons to cover all the pages you want to select.
select python_command_action on each action button.
under the false_python_cmd_string add this:
INSTANCE.stack_frame_0.setCurrentIndex(0)
but on each button use a different page index number. index start at zero and go up
That should do it.
Chris M
The following user(s) said Thank You: auto-mation-assist
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
8 years 2 weeks ago #118923
by cmorley
Replied by cmorley on topic qtvcp issues
If you want to test this without changing the stack widgets you have you can.
It's just when linuxcnc changes mode they will change too.
Chris M
It's just when linuxcnc changes mode they will change too.
Chris M
The following user(s) said Thank You: auto-mation-assist
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
8 years 2 weeks ago #118929
by cmorley
Replied by cmorley on topic qtvcp issues
I changed my mind a bit and push more work that changes where the python commands are added. You'll find the python command properties under indicated_buttons title ( its still using action buttons)
Also for a non checkable button you's use the true_python_cmd_string now
Hope that wasn't too confusing...
Chris M
Also for a non checkable button you's use the true_python_cmd_string now
Hope that wasn't too confusing...
Chris M
The following user(s) said Thank You: auto-mation-assist
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Offline
- Platinum Member
-
Less
More
- Posts: 425
- Thank you received: 81
8 years 2 weeks ago #118970
by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I'm somewhat confused in building a handler file and still exploring the available samples with the qt5vcp_py2 branch. In working with glade in the past I could see the signals and name them, but how do I find them in qtvcp? I always liked to make a signals list in a .txt file to help with coding.
I'm hoping that I will be able to display the gui soon but right now loading fails before that point. This really not surprising since a proper handler as not been built yet.
Debug gives me lots of output before shutting things down as in the few lines shown below.
emc/task/emctask.cc 396: interp_error: File not open
File not open
Then lots more debug messages and finally where it stops:
[QTvcp.QTVCP.QT_MAKEPINS][DEBUG] HAL-ified instance found: abtn_override_feed_rate (qt_makepins.py:56)
[QTvcp.QTVCP.QT_MAKEPINS][DEBUG] HAL-ified instance found: btn_jog_method (qt_makepins.py:56)
[QTvcp.QTVCP.QT_MAKEPINS][DEBUG] HAL-ified instance found: slider_jog_slow_rate (qt_makepins.py:56)
Shutting down and cleaning up LinuxCNC...
It also reporting that it needs a change here:
[QtDesigner.QTVCP.QT_ISTAT][WARNING] Invalid message configuration (missing boldtext) in INI File [DISPLAY] sectioN (qt_istat.py:143)
I will do another pull and continue to work on this.
I'm hoping that I will be able to display the gui soon but right now loading fails before that point. This really not surprising since a proper handler as not been built yet.
Debug gives me lots of output before shutting things down as in the few lines shown below.
emc/task/emctask.cc 396: interp_error: File not open
File not open
Then lots more debug messages and finally where it stops:
[QTvcp.QTVCP.QT_MAKEPINS][DEBUG] HAL-ified instance found: abtn_override_feed_rate (qt_makepins.py:56)
[QTvcp.QTVCP.QT_MAKEPINS][DEBUG] HAL-ified instance found: btn_jog_method (qt_makepins.py:56)
[QTvcp.QTVCP.QT_MAKEPINS][DEBUG] HAL-ified instance found: slider_jog_slow_rate (qt_makepins.py:56)
Shutting down and cleaning up LinuxCNC...
It also reporting that it needs a change here:
[QtDesigner.QTVCP.QT_ISTAT][WARNING] Invalid message configuration (missing boldtext) in INI File [DISPLAY] sectioN (qt_istat.py:143)
I will do another pull and continue to work on this.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
8 years 2 weeks ago #118975
by cmorley
Replied by cmorley on topic qtvcp issues
As a test try this:
save your designer screen in configs/sim/qtvcp_screens as tester.ui
start linuxcnc and select :
sample configs / sim / qtvcp_screens / tester
That should load your screen as a sim- it also displays tons of debug lines in the terminal
Chris M
save your designer screen in configs/sim/qtvcp_screens as tester.ui
start linuxcnc and select :
sample configs / sim / qtvcp_screens / tester
That should load your screen as a sim- it also displays tons of debug lines in the terminal
Chris M
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 1.076 seconds