This line of main.cpp:
mainWidget w
(const QUrl &Urlh
);
mainWidget w(const QUrl &Urlh);
To copy to clipboard, switch view to plain text mode
is not what you think it is. This is a declaration of a function w() that takes a QUrl and returns a mainWidget (that function does not exist). What you are trying to do is construct a mainWidget object and provide its constructor with an argument (a QUrl value) thus:
mainWidget w(histUrl);
w.show();
mainWidget w(histUrl);
w.show();
To copy to clipboard, switch view to plain text mode
This is precisely the same sort of thing you do in the mainWidget constructor when you pass the QUrl value into the FileDownloader constructor.
What is at line 22 of filedownloader.h?
Edit: Answered my own question
Line 22 of filedownloader.h must be this one:
void DataA(m_DownloadedData);
void DataA(m_DownloadedData);
To copy to clipboard, switch view to plain text mode
The header is a declaration not an implementation. You are declaring a function DataA(...) that returns nothing and takes an argument. The stuff in the parentheses is the type (and optionally name) of the argument. What you have supplied is a name that is unknown as a type: hence the error. What you should be doing is:
void DataA(const QByteArray &someName);
To copy to clipboard, switch view to plain text mode
While this is a Qt signal, to C++ it is simply another function. The implementation of this function is provided by the Qt tools (moc), which is why you do not need/see this function implemented in filedownloader.cpp.
It seems that a lack of understanding of C++, not Qt, is a reasonable part of the problems here. Rather than run up a white flag perhaps taking a step back and doing some generic C++ tutorials would be useful.
Bookmarks