bigg
29th April 2008, 08:40
I am using an instance of QFileDialog so a user can search for a directory that meets a specific criteria. When the directory signature is recognised by my code, I want to use
emit fileDialog->accept();
I have declared this signal in the header file with
signals:
void accept ();
so the user does not have to press the OK button. This will save the user time traversing directories.
When I try to compile with this line, I get an error: 'virtual void QDialog::accept()' is protected
Why is this compilation error occuring when QFileDialog is a sub class of QDialog?.
What can I do to get this code to work?
Any suggestions will be greatly appreciated. Thanks
emit fileDialog->accept();
I have declared this signal in the header file with
signals:
void accept ();
so the user does not have to press the OK button. This will save the user time traversing directories.
When I try to compile with this line, I get an error: 'virtual void QDialog::accept()' is protected
Why is this compilation error occuring when QFileDialog is a sub class of QDialog?.
What can I do to get this code to work?
Any suggestions will be greatly appreciated. Thanks