Originally Posted by
Kuushie118
but sir, is there a way to fix my error?
My professor wants me to do it that way
you say that my error is that I don't have a class dialog.
but don't I have one at secwindow.h line 23??
Actually, yes you do have a declaration of Dialog at that location. I misread the error message. While you do have a Dialog class, you do not have a Dialog class constructor that accepts an argument. Your code:
Dialog *dialog = new Dialog(this); //ERROR: no matching constructor for initialization of 'Dialog'
Dialog *dialog = new Dialog(this); //ERROR: no matching constructor for initialization of 'Dialog'
To copy to clipboard, switch view to plain text mode
is passing an argument and this does not match any constructor you have declared:
{
public:
Dialog(); // <<<< no arguments accepted
...
class Dialog : public QDialog
{
public:
Dialog(); // <<<< no arguments accepted
...
To copy to clipboard, switch view to plain text mode
Your Dialog constructor should have a similar declaration and implementation to the one you have for SecWindow.
Bookmarks