Couple questions about QTPYVCP

More
12 Dec 2019 10:19 #152521 by Leon82

Leon, my bad!

When i fixed another bug I changed some logic that made it fail if there was a folder with the same name as the VCP in the current working directory. I was unable to duplicate your problem at first because I usually launch QTPyVCP from within my dev directory so don't have any folders with the same name as a VCP. Should be fixed now, sorry about that!


Awesome, thanks!

Please Log in or Create an account to join the conversation.

More
13 Dec 2019 04:04 #152585 by Leon82
That did the trick

Thanks!

Please Log in or Create an account to join the conversation.

More
15 Dec 2019 16:04 - 15 Dec 2019 20:06 #152691 by Leon82
How are you able to tie the push button to a page in the stackedwidget?

I have seen examples in the dynamic property field, but when I add a button the dynamic property section wasn't there if I recall.
Last edit: 15 Dec 2019 20:06 by Leon82.

Please Log in or Create an account to join the conversation.

More
18 Dec 2019 17:50 #152865 by BigJohnT

How are you able to tie the push button to a page in the stackedwidget?

I have seen examples in the dynamic property field, but when I add a button the dynamic property section wasn't there if I recall.


I use a lot of stacked widgets in my Mill Touch V6.
github.com/jethornton/mill_touch_v6

After selecting the qpushbutton in the Property Editor click on the green plus sign and select other, then choose int and give it a name.

JT
The following user(s) said Thank You: Leon82

Please Log in or Create an account to join the conversation.

More
21 Dec 2019 06:48 #152988 by Leon82
Thanks, I got it working like I wanted.

Another question,

I tried to put an background image on a gridframe and it shows in the designer but in the sim it doesn't.

I tried it on a label also and as just an image. Png and jpeg format.

Does something have to be done to the main window py?

Please Log in or Create an account to join the conversation.

More
21 Dec 2019 11:34 #152993 by Gnevko
May be the resources path should be adapted?

Please Log in or Create an account to join the conversation.

More
21 Dec 2019 12:14 - 21 Dec 2019 12:30 #152994 by Leon82

May be the resources path should be adapted?


The picture is on the resource manager in the designer and when you edit a style sheet it is available to select
Last edit: 21 Dec 2019 12:30 by Leon82.

Please Log in or Create an account to join the conversation.

More
22 Dec 2019 16:16 - 22 Dec 2019 16:18 #153041 by Leon82
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>
Last edit: 22 Dec 2019 16:18 by Leon82.

Please Log in or Create an account to join the conversation.

More
22 Dec 2019 16:30 #153042 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP
Those are GTK warnings complaining about a QtDesigner dialog, they are not related to QtPyVCP. They can be ignored.

These type of warnings are what made me come to loathe GTK and switch to Qt!


The reason the image is not showing when you run your VCP is because you have not re-compiled the qrc file after you added to it. You need to use the qcompile tool to compile it to a python file each time you make changes. To use it just pass the path to the directory containing the qrc file.

Here is some documentation:
qtpyvcp.kcjengr.com/tools/qcompile.html

Cheers,
Kurt
The following user(s) said Thank You: Leon82

Please Log in or Create an account to join the conversation.

More
22 Dec 2019 17:04 #153048 by Leon82
thanks

do i need to add refrences to the files anywhere? it compiled but im not seeing it still.

Compiling .qrc files in package '.':
resources.qrc => resources_rc.py ... ok
leon@debian:~/vcp4$ qcompile .
Compiling .ui files in package '.':
mainwindow.ui => mainwindow_ui.py ... ok

Compiling .qrc files in package '.':
resources.qrc => resources_rc.py ... ok
leon@debian:~/vcp4$



this is the sources file
MANIFEST.in
README.md
setup.py
vcp4/__init__.py
vcp4/__init__.py.bak
vcp4/config.yml
vcp4/config.yml.bak
vcp4/mainwindow.py
vcp4.egg-info/PKG-INFO
vcp4.egg-info/SOURCES.txt
vcp4.egg-info/dependency_links.txt
vcp4.egg-info/entry_points.txt
vcp4.egg-info/top_level.txt
vcp4/resources/resources.qrc
vcp4/ui/mainwindow.ui
vcp4/ui/style.qss

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.146 seconds
Powered by Kunena Forum