Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:34:51+00:00 2026-05-23T17:34:51+00:00

I am trying to pass a member function to QtConcurrent::run() I have tried to

  • 0

I am trying to pass a member function to QtConcurrent::run()

I have tried to do it like so:

GDALDriver *poNITFDriver;
future = QtConcurrent::run(poNITFDriver,&GDALDriver::CreateCopy, pszDstFilename, poDataset, FALSE,  papszOptions, pfnProgress, NULL);

but I get a slew of errors regarding no matching function call.

This was the original call:

poNITFDriver->CreateCopy(pszDstFilename, poDataset, FALSE, papszOptions, pfnProgress, NULL);

What am I doing wrong? Can run() accept that many arguments?

This is the error I get:

error: no matching function for call to run(GDALDriver*&, GDALDataset* (GDALDriver::*)(const char*, GDALDataset*, int, char**, int (*)(double, const char*, void*), void*), const char**, GDALDataset**, bool, char***, int (**)(double, const char*, void*), NULL)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:34:52+00:00Added an answer on May 23, 2026 at 5:34 pm

    You will have to pass a pointer of the object as the first argument and the address of the method as the second argument (then follow it by any other arguments).

    Have a look at this documentation. Have a look at the sections:

    • Using Member Functions
    • Using Lambda Functions

    Specifically, you can use boost::bind() or std::tr1::bind() to bind a number of arguments to a function when called. There are number of reasons for doing this:

    • To call a function that takes more than 5 arguments.
    • To simplify calling a function with constant arguments.
    • Changing the order of arguments.

    I think you have more than 5 parameters being passed there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to pass a member function as an argument. Basically I have a
I am trying to pass a member function within a class to a function
In Javascript I'm trying to pass a class member to a jQuery function, but
I am trying to pass a member function to libevent which should be treated
I'm trying to pass a member function pointer as a template parameter. Here is
Hi I am trying to pass a callback which is a member function. I
im trying to pass two parameters to a function, i being an int value
I'm trying to pass one method to another in elisp, and then have that
I'm trying to pass an instance of a class between two separate classes, like
I have a List(Of AddlInfo) with AddlInfo being an object. I'm trying to pass

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.