[PyQt] Passing text from MainWindow to popup Dialog
Entity Reborn
entityreborn at gmail.com
Thu Mar 24 00:04:10 GMT 2011
Your welcome :)
On Mar 23, 2011, at 4:44 PM, James Polk <jpolk5001 at yahoo.com> wrote:
Thank you very much, ER!...that worked...
--- On *Tue, 3/22/11, Entity Reborn <entityreborn at gmail.com>* wrote:
From: Entity Reborn <entityreborn at gmail.com>
Subject: Re: [PyQt] Passing text from MainWindow to popup Dialog
To: "James Polk" <jpolk5001 at yahoo.com>
Cc: "pyqt at riverbankcomputing.com" <pyqt at 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 at yahoo.com</mc/compose?to=jpolk5001 at 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 at riverbankcomputing.com>
PyQt at riverbankcomputing.com </mc/compose?to=PyQt at riverbankcomputing.com>
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110323/20a14d40/attachment.html>
More information about the PyQt
mailing list