Important: Please read the Qt Code of Conduct -

QtConcurrent::run with functions with default arguments

  • Is there a way to run a function that specifies default arguments using QtConcurrent::run() (and use the default arguments)? I have a function void MyFunction(const float a = 1.0f); that I can call with QtConcurrent::run(FunctionWithDefaultArguments, 2.0f);, but not QtConcurrent::run(FunctionWithDefaultArguments);

    (Note that FunctionWithDefaultArguments() works fine (without run()).

    Is this possible?



Log in to reply