qtvcp issues

More
17 Jul 2018 22:37 #114431 by cmorley
Replied by cmorley on topic qtvcp issues
Is your config metric based? i haven't tested metric configs - i'll have to do that.

I'll look into the metric increments problem, it's probably related to your continuous jogging problem.

If the jog speed is slow try setting the jog rate higher.
widgets StatusSlider and statusAdjustmentBar can set the jog rate or you can set it in your handlerfile directly: STATUS.set_jog_rate(<some rate>) should do it.

As for your button for gcode commands. - Action buttons can be used to run commands set from the INI file - (makes it easier to make quick changes) or you can set the MDI command directly in Designer (must be a command that doesn't need input - such as zeroing all axes).

Your buttons that set an axis to a selectable number must use slots to the form as yo have done.
Using the qtvcp.Action library might be cleaner programing:

ACTION.CALL_MDI(<some code>)
Will ensure linuxcnc is in the proper mode and then run the MDI command.

Of course you must import the library and instaniate it as ACTION.
I don't see any library imports in your handler file but assume they are there.

Chris M
The following user(s) said Thank You: Ilya
More
17 Jul 2018 22:48 #114432 by cmorley
Replied by cmorley on topic qtvcp issues
I confirm the jog increments issue with a metric config.
Will work on this tonight - thanks.

Chris M
The following user(s) said Thank You: andypugh, Ilya
More
19 Jul 2018 08:59 #114520 by cmorley
Replied by cmorley on topic qtvcp issues
I have pushed some work on this that should fix the jogging increments issue if you are using the jogIncrements combo box.
You should be able to just pull the branch - no conflicts.
i added a metric based config so i can test with.

jograte still doesn't change into metric units - i'll work on that next.

For angular jogging I guess it's required to have two combo boxes; one for linear, one for angular so i will update the jogincrements widgets to cover that.

Jog increments action buttons are a little different - I'll have to decide how to handle that.

Chris M
The following user(s) said Thank You: Ilya
More
19 Jul 2018 23:58 #114544 by cmorley
Replied by cmorley on topic qtvcp issues
ok pushed work for angular jog rate and angular increments.
Should be pretty functional now.

One thing I missed is having the jog rate display switch units when in different units (g20/g21) mode. It doesn't lie the rate is converted else where but is displayed in machine units.
I could see arguments for leaving it that way (someone used to imperial for instance may not intuitively understand the jog rate in metric) but also could see it as confusing if yo are expecting that in metric mode everything is metric.

jog distance is different and you can use the combo box to set either units in either units mode. I could add an option to have that change to metric only in metric mode and imperial only in imperial mode if it was really desired.

Chris M
The following user(s) said Thank You: Ilya
More
10 Oct 2018 02:06 #118614 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris I installed your qt5vcp_py2 development branch on my development computer and it compiled fine and all links to the screens displayed properly. I'm very encouraged now to develop some custom screen panels in QT that suit my machines requirements. I still have to install QT 5 opensource and the QT creator package but I'm really encouraged by your work.

I have seen mention that there may be some videos available to help getting started with qtvcp and wonder if you can tell me how to access those.
More
10 Oct 2018 04:50 #118617 by cmorley
Replied by cmorley on topic qtvcp issues
Auto-mation-assit:

I'm glad it is so far working well for you. I've taken a bit of a break on it - but if someone like your self is interested in trying it out - that would probably get me working on it again.

to get Designer working with QTvcp is a bit of a pain.
In the branch there are a couple of precompiled libraries that are available to help.
Currently I have precompiled for x86_64 CPU and either qt5.5 or qt 5.7.
Hopefully you are using a 64 bit version of linux and using one of those versions of QT - If you tell me your distribution version I can help with that.

There is a README with some instructions to get designer working (lib/python/qtvcp/designer) thats also where the precompiled libraries are.
I'l copy the README here too.

As for video I have a short youtube video showing me building a very basic screen.
There is no audio - I don't know how helpful it is but the link is here:


There is some documentation in the branch - if you compile with the html documentation switch on you can read them on your web browser.
or just read the text files in docs/ src/gui/
I think it may still be called qtscreen. There are also some other QTvcp docs in the there too.

I hope you are patient as QTvcp is new and really not tested much.
I look forward to your questions.

Chris M
The following user(s) said Thank You: tommylight, racedirector, Ilya
More
10 Oct 2018 05:48 #118621 by tommylight
Replied by tommylight on topic qtvcp issues
That was enlightening ! Awesomely easy.
Thank you Chris.
P.S.
Thank you for a lot of other stuff you do so well.
More
10 Oct 2018 06:35 - 10 Oct 2018 20:52 #118624 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
On my development computer I'm running Mint 18.3 64bit, uname -a gives me:
Linux cnc-OptiPlex-9020 4.9.98-rt76 #1 SMP PREEMPT RT Sun Sep 30 11:12:48 AKDT 2018 x86_64 x86_64 x86_64 GNU/Linux
32 bit support for some programs is also installed.

I added these for qt designer
sudo apt-get install qttools5.dev
sudo apt-get install qttools5-dev-tools
The below is not called for but out of curiosity I installed it
sudo apt-get install qttools5-private-dev

I call up the qt designer from within my qt development (LC-qt-10-09-2018) folder after the . ./scripts/rip-environment with:
$ designer -qt=5

In linuxcnc I have looked at all the screens in Sample Configurations under qtvcp_screens, blender, qt_800x600, qtdefault, qtdefault_9axis, qtdefault_gantry, qtdefault_mm, tester, and under_custom, qtdefault_ngc. All these displayed nicely within linuxcnc itself. The blender screen looks like a early version of a blender development with some items not having been completed yet but still looks nice and works out good for testing how it displays.

When I load the /share/qtvcp/screens/blender/blender.ui into QT Designer I can see all the buttons but the coloured background is not shown and some pictures such as the Estop round red one on is also not shown. Since I don’t know anything about the QT Designer yet I don’t know if this is normal, but will assume this is due to a linking issue. The qtdefault_9axis shows no coloured background either so this may be normal for whatever mode the designer is in right now. It does show some display values in yellow.

As root I have copied /lib/python/qtvcp/designer/x86_64/qt5.5/libpyqt5_py2.so to my /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/libpyqt5_py2.so.

My suspected link problem is likely due to the fact that I have not yet attempted to link the qtvcp_plugin.py to the folder that designer will search for to get its information from. If you can give me hint here it will be greatly appreciated.

The qtvcp_plugin.py file in my system is in:
/home/cnc/LC-qt-10-09-2018/lib/python/qtvcp/plugins/qtvcp_plugin.py

So far I have isolated about 170 files related to qtvcp in this build. And printed out all the read me type files and looked at the qt related items in the make and submake files.

I have a lots of patience and a good learning curve. I did find two videos you made and downloaded them (no sound on those).
Last edit: 10 Oct 2018 20:52 by auto-mation-assist. Reason: Removed extra line feed and added qtdefault_9axis disply comment and make/submake files.
More
10 Oct 2018 21:12 - 10 Oct 2018 21:35 #118659 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris

I did more searching for information and found out that I needed to do the below to to get the search path link for the designer correct.

For my system as root I made a python folder to the designer folder as seen below.
# /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/python
Then opened the newly created python folder and made a link to qtvcp_plugin.py in linuxcnc as below.
# ln ///home/cnc/LC-qt-10-09-2018/lib/python/qtvcp/plugins/qtvcp_plugin.py
Now it shows the qtvcp_plugin.py icon in the newly generated python folder.

When I open the designer I can see the Linuxcnc - Hal, Linuxcnc - Controller and Linuxcnc - Dialogs items in the designer.
Now I have to figure out how to eliminate the "Missing icon for" warnings like three below examples. But there are many more.

Missing icon for 'LCDNumber' widget (qtvcp_icons.py:21)
Missing icon for 'gcodegraphics' widget (qtvcp_icons.py:21)
Missing icon for 'camviewdialog' widget (qtvcp_icons.py:21)

In the file list for qtvcp that I made I only see the below and wonder if that folder should not contain more icons.

/lib/python/qtvcp/widgets/widget_icons/dro_label.png
/lib/python/qtvcp/widgets/widget_icons/graphics.png
/lib/python/qtvcp/widgets/widget_icons/led.png
/lib/python/qtvcp/widgets/widget_icons/linuxcnc-wizard.gif
/lib/python/qtvcp/widgets/widget_icons/originoffsetview.png
Last edit: 10 Oct 2018 21:35 by auto-mation-assist. Reason: Added found icon listing /lib/python/qtvcp/widgets/widget_icons/
More
11 Oct 2018 02:12 #118662 by cmorley
Replied by cmorley on topic qtvcp issues
Auto-mation-assist:

Warnings about icons can be ignored - as you found there are only a few present - i am not good at icons :)

QT uses what's called 'styles sheets' for changing colors and stylizing widgets.
For Qtvcp there is a separate file that holds all the CSS style definitions.
I have not found an easy way to get Designer to use a separate style sheet.
So in general, I build a screen using the default style and then when I'm happy with it, i build a stylesheet for it. that 's why they don't look the same in Qt Designer vrs QTvcp.

The estop button in Blender doesn't show because the path to the image uses absolute paths (and so has my personal path) I need to look into getting relative paths to work.

Chris M
Time to create page: 0.096 seconds
Powered by Kunena Forum