[Interest] QTextEdit not resizing with QFormLayout
Sujan Dasmahapatra
sdh at lmwindpower.com
Tue May 8 10:13:06 CEST 2012
Please check this code snippet, with this when I resize the mainwindow,
my textedit is not resizing. What could be the problem pls help.
//mainwindow.h
QPushButton *button;
QTextEdit *edit;
QFormLayout *formL;
//mainwindow.cpp
MainWindow::MainWindow(QWidget *parent):QMainWindow(parent)
{
setGeometry(0,0,800,600);
button = new QPushButton("Click me!!",this);
button->setGeometry(5,5,100,25);
button->show();
edit1 = new QTextEdit(this);
edit1->setGeometry(5, 35, width()-10, height()-40);
edit1->show();
formL = new QFormLayout;
formL->addRow(("&Name:"), edit1);
setLayout(formL);
}
Thanks sujan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120508/546e3b4b/attachment.html>
More information about the Interest
mailing list