I am having trouble passing a variable through a connection.
Within a function, I have a variable filename that I want to pass on to writefile(std::string), and I am trying to use a connection that follows:
connect(reply, SIGNAL(finished()), this, SLOT(writefile(filename)));
connect(reply, SIGNAL(finished()), this, SLOT(writefile(filename)));
To copy to clipboard, switch view to plain text mode
When I change that connection and the function to define the filename in the function writefile(), then it works (with the following connection):
connect(reply, SIGNAL(finished()), this, SLOT(writefile()));
connect(reply, SIGNAL(finished()), this, SLOT(writefile()));
To copy to clipboard, switch view to plain text mode
But I need the function to be able to accept a filename variable when that signal slot connection is made, how can I make that work? Thank you in advance.
Bookmarks