qtvcp issues
- auto-mation-assist
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
18 Oct 2018 01:07 #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.
18 Oct 2018 03:44 #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.
18 Oct 2018 03:49 #118976
by cmorley
Replied by cmorley on topic qtvcp issues
What signals are you referring to?
In GLADE one could select signals to call functions in the handler file.
You can do that in designer too (signals and slots), but the process is a little different.
In the docs, under qtscreen it outlines how to do that.
You would use this process if none of the special widgets do what you want.
Chris M
In GLADE one could select signals to call functions in the handler file.
You can do that in designer too (signals and slots), but the process is a little different.
In the docs, under qtscreen it outlines how to do that.
You would use this process if none of the special widgets do what you want.
Chris M
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
18 Oct 2018 18:00 #119008
by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
In designer I never saw any signals for my buttons. After doing more research and reading older entries in this thread I found the answer. The signal/slot check box in the designers view tab was not checked, and also I never clicked on the small green QT icon that can pull up the signal/slot mode display overlay. Still have more to learn about the designer.
I have been working on entering the definitions in my handler and now get this error:
/qt5vcp_py2/scripts/linuxcnc: line 880: 24904 Segmentation fault
(core dumped) $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
I recall reading that someone else had a Segmentation fault. I will search to see if there was a resolution posted. At this point I have just made basic definitions like the sample below to get started. Perhaps this was not correct way for one of them.
def abtn_mainh_edit_file(self):
name = self.w.sender().text()
print name
I need to simplify my gui temporarily by deleting sections of the gui for now and add each section back in one at a time to make it easier to deal with problems. So I will start that process now.
I initially had built this gui with glade about a year ago and had it working but it required making a custom make file for Linuxcnc. Your method is much more desirable since there is no need for a custom linuxcnc make file. At least with the development version of linuxcnc that I use.
I have been working on entering the definitions in my handler and now get this error:
/qt5vcp_py2/scripts/linuxcnc: line 880: 24904 Segmentation fault
(core dumped) $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
I recall reading that someone else had a Segmentation fault. I will search to see if there was a resolution posted. At this point I have just made basic definitions like the sample below to get started. Perhaps this was not correct way for one of them.
def abtn_mainh_edit_file(self):
name = self.w.sender().text()
print name
I need to simplify my gui temporarily by deleting sections of the gui for now and add each section back in one at a time to make it easier to deal with problems. So I will start that process now.
I initially had built this gui with glade about a year ago and had it working but it required making a custom make file for Linuxcnc. Your method is much more desirable since there is no need for a custom linuxcnc make file. At least with the development version of linuxcnc that I use.
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
19 Oct 2018 03:50 - 19 Oct 2018 03:52 #119050
by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
The Segmentation fault I saw was due assigning signals/slots to ActionButtons which were not actually being used as ActionButtons. Its a danger of the copy process and not looking to at the right hand panel of the design as to what type of button was actually being copied. Thus it pays to look at the "Property Editor" heading in the designer to insure that the proper type is shown for its intended use before copying and renaming. Trouble shooting and corrective actions can eat up a lot of time.
For normal push buttons the options in the designer left side panel are::
QPushbutton - from the designer - Buttons.
PushButton - from Linuxcnc - HAL
ActionButton - from Linuxcnc - Controller
Do not assign signals/slots to ActionButton's - select the desired pre-set function from right hand panel under ActionButton.
I wonder if there is a way to block the ability to manually assign signals/slots on ActionButtons. When there is a Segmentation error it does not give a clear cause as to which button is causing the problem. With a Segmentation error a gui will never load or show.
Perhaps this note will be helpful to someone in the future.
For normal push buttons the options in the designer left side panel are::
QPushbutton - from the designer - Buttons.
PushButton - from Linuxcnc - HAL
ActionButton - from Linuxcnc - Controller
Do not assign signals/slots to ActionButton's - select the desired pre-set function from right hand panel under ActionButton.
I wonder if there is a way to block the ability to manually assign signals/slots on ActionButtons. When there is a Segmentation error it does not give a clear cause as to which button is causing the problem. With a Segmentation error a gui will never load or show.
Perhaps this note will be helpful to someone in the future.
Last edit: 19 Oct 2018 03:52 by auto-mation-assist.
Please Log in or Create an account to join the conversation.
19 Oct 2018 04:46 #119051
by cmorley
Replied by cmorley on topic qtvcp issues
There must have been more to it as a perfectly possible to assign signals to slots on actions buttons whether it has an action assigned or not.
It is one disadvantage of QT it tends to give segmentation faults way more then GTK did - and there are hard to trouble shoot.
So I guess this means you got your screen to display!
Chris M
It is one disadvantage of QT it tends to give segmentation faults way more then GTK did - and there are hard to trouble shoot.
So I guess this means you got your screen to display!
Chris M
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
19 Oct 2018 08:41 #119060
by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I did have to change a lot of buttons and while I was doing that I also changed over to the Stacked Widgets. After all the buttons were changed and the handler file updated it still would not open. That problem was traced to the two Linuxcnc - HAL Slider's I had in my jogging page.
I had remove the two sliders before the gui would show. As soon as the loading process ran into the first slider it halted. I looked at the code a bit and to be it looks like it is missing a global value. The error message is below..
Traceback (most recent call last):
File "/home/cnc/qt5vcp_py2/bin/qtvcp", line 379, in <module>
APP = QTVCP()
File "/home/cnc/qt5vcp_py2/bin/qtvcp", line 255, in __init__
self.panel = qt_makepins.QTPanel(self.halcomp, PATH, window, opts.debug)
File "/home/cnc/qt5vcp_py2/lib/python/qtvcp/qt_makepins.py", line 57, in __init__
widget.hal_init(self.hal, str(idname), widget, window, window.PATHS,preference)
File "/home/cnc/qt5vcp_py2/lib/python/qtvcp/widgets/widget_baseclass.py", line 33, in hal_init
self._hal_init()
File "/home/cnc/qt5vcp_py2/lib/python/qtvcp/widgets/simple_widgets.py", line 62, in _hal_init
self.valueChanged.connect(partial(-f))
NameError: global name 'f' is not defined
I had remove the two sliders before the gui would show. As soon as the loading process ran into the first slider it halted. I looked at the code a bit and to be it looks like it is missing a global value. The error message is below..
Traceback (most recent call last):
File "/home/cnc/qt5vcp_py2/bin/qtvcp", line 379, in <module>
APP = QTVCP()
File "/home/cnc/qt5vcp_py2/bin/qtvcp", line 255, in __init__
self.panel = qt_makepins.QTPanel(self.halcomp, PATH, window, opts.debug)
File "/home/cnc/qt5vcp_py2/lib/python/qtvcp/qt_makepins.py", line 57, in __init__
widget.hal_init(self.hal, str(idname), widget, window, window.PATHS,preference)
File "/home/cnc/qt5vcp_py2/lib/python/qtvcp/widgets/widget_baseclass.py", line 33, in hal_init
self._hal_init()
File "/home/cnc/qt5vcp_py2/lib/python/qtvcp/widgets/simple_widgets.py", line 62, in _hal_init
self.valueChanged.connect(partial(-f))
NameError: global name 'f' is not defined
Please Log in or Create an account to join the conversation.
19 Oct 2018 10:02 #119066
by cmorley
Replied by cmorley on topic qtvcp issues
Ok pushed a fix for them, plus some work to give more helpful error messages for a couple common problems.
Chris M
Chris M
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
20 Oct 2018 03:10 #119101
by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
The error messages any more on loading with slider now. But the way the slider acts when resizing is a problem.
There is something amiss with the way the sliders act in relation to the orientation of the slider. I use vertical orientation and noticed that the ball goes off centre when width is adjusted, and also that the tick position likes to default to "above" position in the left panel label. When expanding the geometry the ball can go way off centre. The width adjust just effects the ticks and ball position not the slider or ball size.
There is something amiss with the way the sliders act in relation to the orientation of the slider. I use vertical orientation and noticed that the ball goes off centre when width is adjusted, and also that the tick position likes to default to "above" position in the left panel label. When expanding the geometry the ball can go way off centre. The width adjust just effects the ticks and ball position not the slider or ball size.
Please Log in or Create an account to join the conversation.
20 Oct 2018 03:25 #119102
by cmorley
Replied by cmorley on topic qtvcp issues
Still talking about HAL sliders?
If you are they regular sliders with HAL pins - qtvcp does not change anything else.
I tried a panel with a slider it looks fine so it must be an interaction with something else.
If you can post your UI file or a sample ui file, then I could look further into it.
Chris M
If you are they regular sliders with HAL pins - qtvcp does not change anything else.
I tried a panel with a slider it looks fine so it must be an interaction with something else.
If you can post your UI file or a sample ui file, then I could look further into it.
Chris M
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.110 seconds