[PyQt] Layout and widget interaction

Anshul Jain aj.phoenixter at gmail.com
Fri May 14 18:07:52 BST 2010


Hello,

I have made a very small trial application in which there are 2 widgets
inside a horizontal layout.(Please see attached image). One contains images
and the other contains a text editor. The code snippet that adds these
widgets to this layout is:

mainWidget = QtGui.QWidget()
    horizontalLayout = QtGui.QHBoxLayout()
    horizontalLayout.addWidget(ImageWidget())
    horizontalLayout.addWidget(editorWidget())

My aim is that when i click on an image  in the ImageWidget() it must reads
a file corresponding to that image and then display the text in
editorWidget(). I have been able to write code to find which image has been
l have clicked but then I don't know to transfer that filename to the
editorWidget() in the horizontalLayout. How should I do it. Please help me
out. I'm really stuck at it.  :(

Thanks and regards
Anshul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100514/f704a813/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen.tiff
Type: image/tiff
Size: 36800 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100514/f704a813/attachment-0001.tiff>


More information about the PyQt mailing list