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

List:       pykde
Subject:    Re: [PyQt] Passing text from MainWindow to popup Dialog
From:       Entity Reborn <entityreborn () gmail ! com>
Date:       2011-03-24 0:04:10
Message-ID: 852296644292195228 () unknownmsgid
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Your welcome :)

On Mar 23, 2011, at 4:44 PM, James Polk <jpolk5001@yahoo.com> wrote:



Thank you very much, ER!...that worked...



--- On *Tue, 3/22/11, Entity Reborn <entityreborn@gmail.com>* wrote:


From: Entity Reborn <entityreborn@gmail.com>
Subject: Re: [PyQt] Passing text from MainWindow to popup Dialog
To: "James Polk" <jpolk5001@yahoo.com>
Cc: "pyqt@riverbankcomputing.com" <pyqt@riverbankcomputing.com>
Date: Tuesday, March 22, 2011, 6:17 PM

Store your popup as a variable in the main dialog class, (self.popup =
MyPopup()), and then later you can access that dialog using self.popup from
your main form.

On Mar 22, 2011, at 2:39 PM, James Polk
<jpolk5001@yahoo.com</mc/compose?to=jpolk5001@yahoo.com>>
wrote:


I have a scenario where my MainWindow needs to call and display
a popup Window...and while the window is open, processing continues
in the main application, and during processing needs to send a string or
two of text to the popup dialog.

I know how to call and display the popup window/dialog,..and I know how
to send the popup a line of text *before* it pops up....and I know how to
get text *back* when it closes...but I can't figure out how to
intermittently
send the popup text for it to display.

I have two files....let's call them main.py and popup.py
In main.py, I do a

import popup as dialog

This works:
                dialog = popAdd.AddNewRecordDialog(stuff,None)
                dialog.exec_()

What I'd like to do inside of main.py is call..

                dialog.DoIt("Whatever will be, will be")

popup.py has a plainTextEdit box,...and inside a function named "DoIt"
which is currently looking like this:  (though I've tried other
permutations)

    def DoIt(message,self):
        QDialog.plainTextBox.setPlainText(message)

I've also tried from inside main.py:

     dialog.plainEditText.setText(message)

but that doesn't work either,...

Anybody got any ideas how to make this work?...
Or, if you have another suggestions, I'm all ears...

Cheers,
-Jim



_______________________________________________
PyQt mailing list     </mc/compose?to=PyQt@riverbankcomputing.com>
PyQt@riverbankcomputing.com </mc/compose?to=PyQt@riverbankcomputing.com>
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[Attachment #5 (text/html)]

<html><body bgcolor="#FFFFFF"><div>Your welcome :)<br><br>On Mar 23, 2011, at 4:44 \
PM, James Polk &lt;<a href="mailto:jpolk5001@yahoo.com">jpolk5001@yahoo.com</a>&gt; \
wrote:<br><br></div><div></div><blockquote type="cite"> <div><table cellspacing="0" \
cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: \
inherit;"><br><br>Thank you very much, ER!...that worked...<br><br><br><br>--- On \
<b>Tue, 3/22/11, Entity Reborn <i>&lt;<a \
href="mailto:entityreborn@gmail.com">entityreborn@gmail.com</a>&gt;</i></b> \
wrote:<br> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: \
5px; padding-left: 5px;"><br>From: Entity Reborn &lt;<a \
href="mailto:entityreborn@gmail.com">entityreborn@gmail.com</a>&gt;<br>Subject: Re: \
                [PyQt] Passing text from MainWindow to popup Dialog<br>
To: &quot;James Polk&quot; &lt;<a \
href="mailto:jpolk5001@yahoo.com">jpolk5001@yahoo.com</a>&gt;<br>Cc: &quot;<a \
href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a>&quot; \
&lt;<a href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a>&gt;<br>
                
Date: Tuesday, March 22, 2011, 6:17 PM<br><br><div id="yiv1296267907"><div>Store your \
popup as a variable in the main dialog class, (self.popup = MyPopup()), and then \
later you can access that dialog using self.popup from your main form.</div> \
<div><br>On Mar 22, 2011, at 2:39 PM, James Polk &lt;<a rel="nofollow" \
target="_blank" href="/mc/compose?to=jpolk5001@yahoo.com"><a \
href="mailto:jpolk5001@yahoo.com">jpolk5001@yahoo.com</a></a>&gt; wrote:<br> \
<br></div><div></div><blockquote type="cite"><div><table border="0" cellpadding="0" \
cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><br>I have a \
scenario where my MainWindow needs to call and display<br>

a popup Window...and while the window is open, processing continues<br>in the main \
application, and during processing needs to send a string or<br>two of text to the \
popup dialog.<br><br>I know how to call and display the popup window/dialog,..and I \
know how<br>

to send the popup a line of text *before* it pops up....and I know how to<br>get text \
*back* when it closes...but I can&#39;t figure out how to intermittently<br>send the \
popup text for it to display.<br><br>I have two files....let&#39;s call them main.py \
and popup.py<br>

In main.py, I do a<br><br>import popup as dialog<br><br>This works:<br>               \
dialog =  popAdd.AddNewRecordDialog(stuff,None)<br>                               \
dialog.exec_()<br><br>What I&#39;d like to do inside of main.py is call..<br><br>     \
dialog.DoIt(&quot;Whatever will be, will be&quot;)<br><br>popup.py has a \
plainTextEdit box,...and inside a function named &quot;DoIt&quot;<br>

which is currently looking like this:   (though I&#39;ve tried other \
permutations)<br><br>       def DoIt(message,self):<br>               \
QDialog.plainTextBox.setPlainText(message)<br><br>I&#39;ve also tried from inside \
main.py:<br>

<br>         dialog.plainEditText.setText(message)<br><br>but that doesn&#39;t work \
either,...<br><br>Anybody got any ideas how to make this work?...<br>Or, if you have \
another suggestions, I&#39;m all ears...<br><br>Cheers,<br>

-Jim<br><br><br></td></tr></tbody></table><br>

      </div></blockquote><blockquote \
type="cite"><div><span>_______________________________________________</span><br><span>PyQt \
mailing list       <a rel="nofollow" target="_blank" \
href="/mc/compose?to=PyQt@riverbankcomputing.com"></a><a rel="nofollow" \
target="_blank" href="/mc/compose?to=PyQt@riverbankcomputing.com"><a \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a></a></span><br>


<span><a rel="nofollow" target="_blank" \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt"><a \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></a></span></div>
 </blockquote></div></blockquote></td></tr></tbody></table><br>







      </div></blockquote></body></html>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://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