PDA

View Full Version : SizeHint problem



marmistrz
6th December 2011, 15:06
Hi
I'm learning Qt.
I was trying a test program from a book, but I've got an error:


QWidget::setMinimumSize: (/findDialog) Negative sizes (0,-1) are not possible
QWidget::setMaximumSize: (/findDialog) Negative sizes (16777215,-1) are not possible

the code's in attachment

How to fix it?

Santosh Reddy
7th December 2011, 00:15
The attached project works if you have the following statement added in ctor


...
QHBoxLayout* main = new QHBoxLayout;
main -> addLayout(l);
main -> addLayout(r);


setWindowTitle(tr("Find"));
setLayout(main); //<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Add this