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. Q_PROPERTY error when updated to qt 5.12 and QtCreator 4.7.2

Q_PROPERTY error when updated to qt 5.12 and QtCreator 4.7.2

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 639 Views
  • 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.
  • ODБOïO Offline
    ODБOïO Offline
    ODБOï
    wrote on last edited by
    #1

    Hi,
    i had this Q_Property

    Q_PROPERTY(QMap<QString,long long unsigned int> sftpFilesList READ  sftpFilesList WRITE setSftpFilesList NOTIFY sftpFilesListChanged)
    

    and this in my main to make it work

     qRegisterMetaType<QMap<QString,long long unsigned int>>("QMap<QString,long long unsigned int>");
    

    this was ok with Qt5.11 and qt creator 4.5.2

    after i updated to qt 5.12 and QtCreator 4.7.2 project still compil and run but
    i have this errors in the ide :

    Lexical or  Preprocessor Issue
    To many arguments provided to function-like macro invocation
    

    Ho to fiw this please ?

    J.HilkJ 1 Reply Last reply
    0
    • ODБOïO ODБOï

      Hi,
      i had this Q_Property

      Q_PROPERTY(QMap<QString,long long unsigned int> sftpFilesList READ  sftpFilesList WRITE setSftpFilesList NOTIFY sftpFilesListChanged)
      

      and this in my main to make it work

       qRegisterMetaType<QMap<QString,long long unsigned int>>("QMap<QString,long long unsigned int>");
      

      this was ok with Qt5.11 and qt creator 4.5.2

      after i updated to qt 5.12 and QtCreator 4.7.2 project still compil and run but
      i have this errors in the ide :

      Lexical or  Preprocessor Issue
      To many arguments provided to function-like macro invocation
      

      Ho to fiw this please ?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by J.Hilk
      #2

      hi @LeLev

      if you replace

      Q_PROPERTY(QMap<QString,long long unsigned int> sftpFilesList READ  sftpFilesList WRITE setSftpFilesList NOTIFY sftpFilesListChanged)
      

      with

      Q_PROPERTY(QMap sftpFilesList READ  sftpFilesList WRITE setSftpFilesList NOTIFY sftpFilesListChanged)
      

      it should work, I think :-)

      It's a guess on my part, but the docu supports me

      http://doc.qt.io/archives/qt-4.8/properties.html#requirements-for-declaring-properties
      0_1543571035531_c13b95f6-91c5-45d4-b1a0-81614da37f4c-image.png


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      4
      • ODБOïO Offline
        ODБOïO Offline
        ODБOï
        wrote on last edited by
        #3

        Thank you @J-Hilk

        1 Reply Last reply
        0

        • Login

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