[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] PyQt5 embedded in C++ Application with Connect Problem
From: Deepak Hosamane <Deepak.Hosamane () lntebg ! com>
Date: 2015-11-26 11:00:11
Message-ID: 24F6637A8B3E724B9A2061B2BA2EEC4F1D2A0E83 () POCITMSEXMB08 ! LntUniverse ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello,
I am trying to create an application in which user can create screens( .ui =
and generate corresponding ui_.py file using pyuic5.bat ) and then write sc=
ripts ( in .py file ) for them in PyQt5.
I want to embed these python scripts in my Qt based C++ application which w=
ill load these Scripts( because my rest of the application is in Qt ).
I am able to embed this screens created by user into the application but fo=
r some strange reason, the "connect" written inside the scripts fail when c=
alled from the C++ application [ I have tried a timer's timeout and still t=
he slots don't get called. ]
Could someone tell me why this might be happening or at-least a way to get =
some debug logs which might help me knowing what is going wrong. This would=
really help me in a big way.
To run the Example run it as : Test.exe <Full Path of Folder>/Form1.py =
Form
System under consideration is - Windows 7 , 64 bit machine, PyQt5 , Qt 5.4.=
0 ( 64 bit ) , MSVC 2012
PS: If I run these scripts using the Python directly, the scrips work fine =
as they are simple PyQt5 Scripts.
e.g. python.exe D:/Test/Form1.py ( Works Fine ... i.e. the color of pushBut=
ton_2 changes in color )
Thanks and Warm Regards,
Deepak.H
Larsen & Toubro Limited
www.larsentoubro.com
This Email may contain confidential or privileged information for the inten=
ded recipient (s). If you are not the intended recipient, please do not use=
or disseminate the information, notify the sender and delete it from your =
system.
[Attachment #5 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-fareast-language:EN-IN;}
span.EmailStyle20
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.kwd
{mso-style-name:kwd;}
span.pln
{mso-style-name:pln;}
span.typ
{mso-style-name:typ;}
span.pun
{mso-style-name:pun;}
span.str
{mso-style-name:str;}
span.lit
{mso-style-name:lit;}
span.com
{mso-style-name:com;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span \
style="mso-fareast-language:EN-IN">Hello,<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="mso-fareast-language:EN-IN">I am trying to create an \
application in which user can create screens( .ui and generate corresponding ui_.py \
file using pyuic5.bat ) and then write scripts ( in .py file ) for them in PyQt5. \
<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="mso-fareast-language:EN-IN">I want to embed these python scripts in my Qt \
based C++ application which will load these Scripts( because my rest of the \
application is in Qt ).<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="mso-fareast-language:EN-IN">I am able to embed this screens created by user \
into the application but for some strange reason, the "connect" written \
inside the scripts fail when called from the C++ application [ I have tried \
a timer's timeout and still the slots don't get called. ]<o:p></o:p></span></p> <p \
class="MsoNormal" style="orphans: auto;widows: 1;-webkit-text-stroke-width: \
0px;word-spacing:0px"> <span style="mso-fareast-language:EN-IN">Could someone tell me \
why this might be happening or at-least a way to get some debug logs which might help \
me knowing what is going wrong. This would really help me in a big \
way.<o:p></o:p></span></p> <p class="MsoNormal" style="orphans: auto;widows: \
1;-webkit-text-stroke-width: 0px;word-spacing:0px"> <span \
style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="mso-fareast-language:EN-IN">To run the Example run it \
as : Test.exe <Full Path of Folder>/Form1.py \
Form<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="mso-fareast-language:EN-IN">System under consideration \
is - Windows 7 , 64 bit machine, PyQt5 , Qt 5.4.0 ( 64 bit ) , MSVC \
2012<o:p></o:p></span></p> <p class="MsoNormal" style="orphans: auto;widows: \
1;-webkit-text-stroke-width: 0px;word-spacing:0px"> <span \
style="mso-fareast-language:EN-IN">PS: If I run these scripts using the Python \
directly, the scrips work fine as they are simple PyQt5 \
Scripts.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="mso-fareast-language:EN-IN">e.g. python.exe D:/Test/Form1.py ( Works Fine \
… i.e. the color of pushButton_2 changes in color )</span><o:p></o:p></p> <p \
class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN">Thanks and Warm \
Regards,<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="mso-fareast-language:EN-IN">Deepak.H<o:p></o:p></span></p> </div>
<p><span style="color: #000000"><strong>Larsen & Toubro Limited \
</strong></span><br> <br>
<strong><a href="www.larsentoubro.com" \
target="_blank">www.larsentoubro.com</a></strong></p> <p><span style="color: \
#000000">This Email may contain confidential or privileged information for the \
intended recipient (s). If you are not the intended recipient, please do not use or \
disseminate the information, notify the sender and delete it from your \
system.</span></p> </body>
</html>
["Test.zip" (application/x-zip-compressed)]
[Attachment #7 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic