Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12897

Problem when using QtConcurrent::run with members functions.

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.0
    • Core: QtConcurrent
    • None
    • Window 7 64bit with Visual studio 2010.

      In Qt reference documentation,there was a topic about QtConcurrent::run 's Additional API Features
      I've tried to use QtConcurrent::run with members functions,
      however,when i compile the example below,i get the compiler error.It seems that there's no matching function for call QtConcurrent::run().

      // call 'QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const' in a separate thread
      QString string ="win7,linux";
      QFuture<QStringList> future = QtConcurrent::run(string, &QString::split, QString(", "), QString::KeepEmptyParts, Qt::CaseSensitive);
      QStringList result = future.result();

      Please give me some suggestions,

      Thanks in advance.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            earthdomain Earth Domain (Inactive)
            stevetom SteveTom
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes