Yes, it does - thanks mate :-)<div><br></div><div>I'll work my way through this example and adapt what is appropriate - but thanks for the help!</div><div><br></div><div>Peter<br><br><div class="gmail_quote">On Fri, Sep 10, 2010 at 1:55 AM, Baz Walter <span dir="ltr"><<a href="mailto:bazwal@ftml.net">bazwal@ftml.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 09/09/10 05:12, Peter Milliken wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, that previous email should have explained that within the main QFrame<br>
I am attempting to lay everything out using gridlayout.<br>
<br>
On Thu, Sep 9, 2010 at 2:06 PM, Peter Milliken<<a href="mailto:peter.milliken@gmail.com" target="_blank">peter.milliken@gmail.com</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Probably not. The code snippet might be a bad example. I am attempting to<br>
create a QFrame in the MainWindow and populate it with a number of pairs of<br>
lQLabel/QLineEdit. One of the "pairs" needs to be a QLabel/QTextEdit and<br>
unfortunately as soon as I add that the grid seems to 'explode' - in the<br>
vertical direction. I just want a QTextEdit sized about 3 or 4 times the<br>
height of a QLineEdit.<br>
</blockquote></blockquote>
<br></div>
does this do what you want?<br>
<br>
<br>
from PyQt4.QtCore import Qt<br>
from PyQt4.QtGui import (<br>
QApplication, QWidget, QLabel, QLineEdit, QTextEdit,<br>
QFrame, QGridLayout, QVBoxLayout,<br>
)<br>
<br>
class Window(QWidget):<br>
def __init__(self):<br>
QWidget.__init__(self)<br>
self.resize(400, 200)<br>
self.frame = QFrame(self)<br>
self.frame.setFrameShape(QFrame.Box)<br>
grid = QGridLayout(self.frame)<br>
grid.addWidget(QLabel('Item 1', self.frame), 0, 0)<br>
grid.addWidget(QLineEdit(self.frame), 0, 1)<br>
label = QLabel('Item 2', self.frame)<br>
label.setAlignment(Qt.AlignLeft|Qt.AlignTop)<br>
textedit = QTextEdit(self.frame)<br>
textedit.setMaximumHeight(label.sizeHint().height() * 4)<br>
grid.addWidget(label, 1, 0)<br>
grid.addWidget(textedit, 1, 1)<br>
grid.addWidget(QLabel('Item 3', self.frame), 2, 0)<br>
grid.addWidget(QLineEdit(self.frame), 2, 1)<br>
vbox = QVBoxLayout(self)<br>
vbox.addWidget(self.frame)<br>
vbox.addStretch()<br>
<br>
<br>
if __name__ == "__main__":<br>
<br>
import sys<br>
app = QApplication(sys.argv)<br>
win = Window()<br>
win.show()<br>
sys.exit(app.exec_())<br>
</blockquote></div><br></div>