Posts: 3,328 | Thanked: 4,475 times | Joined on May 2011 @ Poland
#1
Hi
I'm learning from Qt GUI programming in C++ book.
But I've got a problem.
The error I get is:
Code:
Object::connect: No such signal findDialog::findclicked()
QObject::connect: Cannot connect (null)::clicked() to findDialog::close()
QLayout: Cannot add null widget to QVBoxLayout/
QWidget::setMinimumSize: (/findDialog) Negative sizes (0,-1) are not possible
QWidget::setMaximumSize: (/findDialog) Negative sizes (16777215,-1) are not possible
what am I doing wrong?
thanks in advance
marmistrz
Attached Files
File Type: gz files.tar.gz (3.1 KB, 70 views)
 
Posts: 440 | Thanked: 160 times | Joined on Aug 2010 @ Las Vegas, NV
#2
haven't checked the code but the error message should be self explanatory.

You should use signal like SIGNAL(findclicked) (not sure about exact code, I always use autocomplete) as signal. This should solve your first problem.
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#3
Originally Posted by marmistrz View Post
Hi
I'm learning from Qt GUI programming in C++ book.
But I've got a problem.
The error I get is:
Code:
Object::connect: No such signal findDialog::findclicked()
QObject::connect: Cannot connect (null)::clicked() to findDialog::close()
QLayout: Cannot add null widget to QVBoxLayout/
QWidget::setMinimumSize: (/findDialog) Negative sizes (0,-1) are not possible
QWidget::setMaximumSize: (/findDialog) Negative sizes (16777215,-1) are not possible
what am I doing wrong?
thanks in advance
marmistrz

Object::connect: No such signal findDialog::findclicked()
Your findclicked function is declared as a SLOT. So, use this instead:

Code:
    connect(findbut, SIGNAL(clicked()),
            this, SLOT(findclicked()));
QObject::connect: Cannot connect (null)::clicked() to findDialog::close()
QLayout: Cannot add null widget to QVBoxLayout/
Well, you try to connect closebut signals, but object closebut isn't
initialized at all. You missed the closebut = new QPushButton(....)
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 20:39.