Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Pass a method to QtConcurrent::map
Forum Updated to NodeBB v4.3 + New Features

Pass a method to QtConcurrent::map

Scheduled Pinned Locked Moved Solved General and Desktop
25 Posts 2 Posters 8.6k Views 1 Watching
  • 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.
  • nulluseN Offline
    nulluseN Offline
    nulluse
    wrote on last edited by
    #21

    See my last update - adding QT += concurrent does not change anything as the project thinks configuration is not changing.

    kshegunovK 1 Reply Last reply
    0
    • nulluseN nulluse

      See my last update - adding QT += concurrent does not change anything as the project thinks configuration is not changing.

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #22

      @nulluse
      Sometimes the IDE is not as smart and it doesn't understand the .pro has changed. Run qmake explicitly (somewhere in the build menu) and do a rebuild after that.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      1
      • nulluseN Offline
        nulluseN Offline
        nulluse
        wrote on last edited by
        #23

        Forcing rebuild does not change anything. The pro file looks like this now:

        #-------------------------------------------------
        #
        # Project created by QtCreator 2016-04-18T13:54:41
        #
        #-------------------------------------------------
        
        QT += core gui concurrent
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        TARGET = MandelbrotQt
        TEMPLATE = app
        SOURCES += main.cpp\
                newform.cpp \
            helpers/fileHelper.cpp \
            mandelbrot/mandelbrot.cpp
        HEADERS  += newform.h \
            helpers/fileHelper.h \
            mandelbrot/mandelbrot.h \
            ui_newForm.h
        FORMS    += newform.ui
        LIBS += -lQt5Concurrent
        CONFIG += c++11
        

        The linker is still complaining.

        kshegunovK 1 Reply Last reply
        1
        • nulluseN nulluse

          Forcing rebuild does not change anything. The pro file looks like this now:

          #-------------------------------------------------
          #
          # Project created by QtCreator 2016-04-18T13:54:41
          #
          #-------------------------------------------------
          
          QT += core gui concurrent
          greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
          TARGET = MandelbrotQt
          TEMPLATE = app
          SOURCES += main.cpp\
                  newform.cpp \
              helpers/fileHelper.cpp \
              mandelbrot/mandelbrot.cpp
          HEADERS  += newform.h \
              helpers/fileHelper.h \
              mandelbrot/mandelbrot.h \
              ui_newForm.h
          FORMS    += newform.ui
          LIBS += -lQt5Concurrent
          CONFIG += c++11
          

          The linker is still complaining.

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #24

          @nulluse
          It looks okay to me, with the only exception of this line: LIBS += -lQt5Concurrent. You shouldn't need to pass that to the linker, adding the QT += concurrent is enough (qmake will generate the appropriate include files and linker switches).

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          1
          • nulluseN Offline
            nulluseN Offline
            nulluse
            wrote on last edited by nulluse
            #25

            Running qmake fixed it!

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved