Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QtConcurrent::run with functions with default arguments

    General and Desktop
    1
    1
    1515
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      daviddoria last edited by

      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?

      Thanks,

      David

      1 Reply Last reply Reply Quote 0
      • First post
        Last post