- Posts: 326
- Thank you received: 0
Couple questions about QTPYVCP
Here is how its done in ProbeBasic: github.com/kcjengr/probe_basic/blob/mast...c/probe_basic.py#L12
Please Log in to join the conversation.
the resources_rc file is in the folder but i get this error
File "/home/leon/vcp4/vcp4/mainwindow.py", line 8, in <module>
import resources_rc
ImportError: No module named resources_rc
this is my top main py file
import os
from qtpyvcp.widgets.form_widgets.main_window import VCPMainWindow
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QAbstractButton
from qtpyvcp.plugins import getPlugin
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtSql import QSqlDatabase
import resources_rc
Please Log in to join the conversation.
You probably have to add an empty __init__.py file to your resources/ dir and then import your resources from there:
from resources import resources_rc
Please Log in to join the conversation.
KCJ wrote: Ah, you have your resources file in a subdirectory!
You probably have to add an empty __init__.py file to your resources/ dir and then import your resources from there:
from resources import resources_rc
THis worked
Thanks!
Please Log in to join the conversation.
Leon82 wrote: i get this in the terminal after i set the image
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
recources.qrc file looks like this
<RCC>
<qresource prefix="newPrefix">
<file>Axes.png</file>
</qresource>
</RCC>
I'm at a loss to understand why a CNC machine is using ICC colour profiles. Its hardly the application where precise colour calibration is required as in high end printing or photographic reproduction.
A quick search indicated this warning is because ICC profiles are embedded in some graphics. Stripping the profile from the image should remove the warning. See:
stackoverflow.com/questions/22745076/lib...rgb-profile/43415650
Please Log in to join the conversation.
Please Log in to join the conversation.
But clearly, this is one case where warnings are warnings and can be ignored... Which is never wise if programming in C...
Please Log in to join the conversation.
rodw wrote: it would be interesting to use one of the batch tools mentioned on stackoverflow to strip out all ICC colour profiles from the images used in the interface to see if the warnings go away.
But clearly, this is one case where warnings are warnings and can be ignored... Which is never wise if programming in C...
When I compiled some Android ROMs I remember having to setup pngcrush.
Please Log in to join the conversation.
At least some of them seems to be caused by icons with incorrect ICC profile, since I get the errors with other apps.
Please Log in to join the conversation.
I am not sure if it's correct please for this question (sorry if not) but my be you can help me with the problem described hier: www.forum.linuxcnc.org/18-computer/38015-whb04b-4#153040
If I press an actionButton in the GUI with the following action: "machine.jog.axis:x,pos" than the machine change the mode from
Attachment not found
to
Attachment not found
and after that I can jog with MPG (WHB04B-4) as it should be. As soon I press one of macro buttons on MPG, the machine goes again in previous state (manual + joint) and I need to press an jog button again on GUI to become MPG work.
The question is, what happens exactly if I press the action button with "machine.jog.axis:x,pos"? Is these the possibility to avoid joint mode?
Please Log in to join the conversation.
