[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Embed PyQt view in Qt window
From:       Keith Lostracco <keith () intentdev ! io>
Date:       2018-03-21 15:00:55
Message-ID: CAHNtrmd3NYoJNKAyGgpzMoTXZLg0p4jNqpL9qPYnYUpy2Vg7Rg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Great! thanks Chris.

On Wed, Mar 21, 2018 at 5:06 AM, Chris Pezley <Chris.Pezley@synopsys.com>
wrote:

> If you want to keep the PyQt widgets inside of a Qt widget, then I'd
> suggest taking a look at how MDI areas work:
>
> http://doc.qt.io/qt-5/qtwidgets-mainwindows-mdi-example.html
>
>
>
> If you want to dynamically add widgets to an existing widget, then you
> could try adding them to the layout. I think that widgets only appear
> free-floating if they have no parent.
>
>
>
> *From:* PyQt [mailto:pyqt-bounces@riverbankcomputing.com] *On Behalf Of *Keith
> Lostracco
> *Sent:* 20 March, 2018 3:52 PM
> *To:* pyqt <pyqt@riverbankcomputing.com>
> *Subject:* [PyQt] Embed PyQt view in Qt window
>
>
>
> I am in the process of designing an application that will be built in C++.
>
> The app will have an embedded python interpreter for rapid development of
> algorithms.
>
> The application GUI will be built with Qt.
>
> I'm thinking of coming up with a rapid workflow where a developer could
> use QtCreator to design a small UI with some input fields, sliders, button
> etc.. then run a function that calls uic and make a Python class. The user
> loads the path to the file (or it that is automated as well) and the GUI
> module is expose their Python script they are creating.
>
> As far as I can tell this should all work fine but at when the PyQt is
> executed, from our Python program in our embedded Python interpretor in our
> C++ application, it will load a floating window.
>
> Is there way to load PyQt within a Qt window in our Python embedded
> application?
>
> That way the widgets would appear to be part of our main application.
>
>
>
> thanks
>
> Keith
>
>
>
>
>



-- 
Keith Lostracco
*Interactive Developer*
*Intent Productions, Inc.*
m: 250 505 2444
w: IntentDev.io  e: Keith@IntentDev.io

[Attachment #5 (text/html)]

<div dir="ltr">Great! thanks Chris.<br></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Wed, Mar 21, 2018 at 5:06 AM, Chris Pezley <span \
dir="ltr">&lt;<a href="mailto:Chris.Pezley@synopsys.com" \
target="_blank">Chris.Pezley@synopsys.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div class="m_-786755437507844704WordSection1">
<p class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">If you want to \
keep the PyQt widgets inside of a Qt widget, then I'd suggest taking a look at how \
MDI areas work:<u></u><u></u></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><a \
href="http://doc.qt.io/qt-5/qtwidgets-mainwindows-mdi-example.html" \
target="_blank">http://doc.qt.io/qt-5/<wbr>qtwidgets-mainwindows-mdi-<wbr>example.html</a><u></u><u></u></span></font></p>
 <p class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><u></u>  \
<u></u></span></font></p> <p class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">If you want to \
dynamically add widgets to an existing widget, then you could try adding them to the \
layout. I think that widgets only appear free-floating  if they have no \
parent.<u></u><u></u></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><u></u>  \
<u></u></span></font></p> <p class="MsoNormal"><b><font size="2" face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;font-weight:bold">From:</span></font></b><font \
size="2" face="Calibri"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> PyQt  [mailto:<a \
href="mailto:pyqt-bounces@riverbankcomputing.com" \
target="_blank">pyqt-bounces@<wbr>riverbankcomputing.com</a>] <b><span \
style="font-weight:bold">On Behalf Of </span></b>Keith Lostracco<br>
<b><span style="font-weight:bold">Sent:</span></b> 20 March, 2018 3:52 PM<br>
<b><span style="font-weight:bold">To:</span></b> pyqt &lt;<a \
href="mailto:pyqt@riverbankcomputing.com" \
target="_blank">pyqt@riverbankcomputing.com</a>&gt;<br> <b><span \
style="font-weight:bold">Subject:</span></b> [PyQt] Embed PyQt view in Qt \
window<u></u><u></u></span></font></p><div><div class="h5"> <p \
class="MsoNormal"><font size="3" face="Times New Roman"><span \
style="font-size:12.0pt"><u></u>  <u></u></span></font></p> <div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt">I am in the process of designing an application \
that will be built in C++. <br>
<br>
The app will have an embedded python interpreter for rapid development of algorithms.
<u></u><u></u></span></font></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt">The application GUI will be built with \
Qt.<u></u><u></u></span></font></p> </div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt">I&#39;m thinking of coming up with a rapid \
workflow where a developer could use QtCreator to design a small UI with some input \
fields, sliders,  button etc.. then run a function that calls uic and make a Python \
class. The user loads the path to the file (or it that is automated as well) and the \
GUI module is expose their Python script they are creating. \
<u></u><u></u></span></font></p> </div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt">As far as I can tell this should all work fine \
but at when the PyQt is executed, from our Python program in our embedded Python \
interpretor  in our C++ application, it will load a floating \
window.<u></u><u></u></span></font></p> </div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt">Is there way to load PyQt within a Qt window in \
our Python embedded application? <br>
<br>
That way the widgets would appear to be part of our main \
application.<u></u><u></u></span></font></p> </div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span \
style="font-size:12.0pt"><u></u>  <u></u></span></font></p> </div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span \
style="font-size:12.0pt">thanks<u></u><u></u></span></font></p> </div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt">Keith<u></u><u></u></span></font></p> <div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New \
Roman"><span style="font-size:12.0pt"><u></u>  <u></u></span></font></p> <div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<table class="m_-786755437507844704MsoNormalTable" cellspacing="0" cellpadding="0" \
border="0"> <tbody>
<tr>
<td colspan="2" style="padding:0in 0in 3.75pt 0in"></td>
</tr>
<tr>
<td colspan="2" style="padding:0in 0in 0in 0in"></td>
</tr>
<tr>
<td colspan="2" style="padding:0in 0in 0in 0in"></td>
</tr>
<tr>
<td style="width:15.0pt;padding:0in 0in 0in 0in" width="20" valign="top"></td>
<td style="padding:0in 0in 0in 0in"></td>
</tr>
<tr>
<td style="width:15.0pt;padding:0in 0in 0in 0in" width="20" valign="top"></td>
<td style="padding:0in 0in 0in 0in" valign="top"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span \
style="font-size:12.0pt"><u></u>  <u></u></span></font></p> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
                dir="ltr"><span><div>
                    <div><table \
style="background:none;border-width:0px;border:0px;margin:0;padding:0" \
cellspacing="0" cellpadding="0" border="0"> <tbody><tr><td colspan="2" \
style="padding-bottom:5px;color:#1b5f9b;font-size:18px;font-family:Arial,Helvetica,sans-serif">Keith \
Lostracco</td></tr> <tr><td colspan="2" \
style="color:#333333;font-size:14px;font-family:Arial,Helvetica,sans-serif"><i>Interactive \
Developer</i></td></tr> <tr><td colspan="2" \
style="color:#333333;font-size:14px;font-family:Arial,Helvetica,sans-serif"><b>Intent \
Productions, Inc.</b></td></tr> <tr><td \
style="vertical-align:top;width:20px;color:#1b5f9b;font-size:14px;font-family:Arial,Helvetica,sans-serif" \
width="20" valign="top">m:</td><td \
style="color:#333333;font-size:14px;font-family:Arial,Helvetica,sans-serif">250 505 \
2444</td></tr> <tr><td \
style="vertical-align:top;width:20px;color:#1b5f9b;font-size:14px;font-family:Arial,Helvetica,sans-serif" \
width="20" valign="top">w:</td><td \
style="vertical-align:top;color:#333333;font-size:14px;font-family:Arial,Helvetica,sans-serif" \
valign="top"><a href="http://IntentDev.io" \
style="color:#a94902;text-decoration:none;font-weight:normal;font-size:14px" \
target="_blank">IntentDev.io</a>    <span style="color:#1b5f9b">e:  </span><a \
href="mailto:Keith@IntentDev.io" \
style="color:#a94902;text-decoration:none;font-weight:normal;font-size:14px" \
target="_blank">Keith@IntentDev.io</a></td></tr> </tbody></table>
</div>
                </div></span></div></div></div></div></div></div>
</div>


[Attachment #6 (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