- Posts: 7368
- Thank you received: 2181
qtvcp issues
- cmorley
- Offline
- Moderator
-
Less
More
8 years 2 weeks ago #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
8 years 1 week ago #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
8 years 1 week ago - 8 years 1 week ago #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: 8 years 1 week 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 1 week ago #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
8 years 1 week ago #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.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
8 years 1 week ago #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.
Moderators: cmorley
Time to create page: 1.206 seconds