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. QObject isn't working
Forum Updated to NodeBB v4.3 + New Features

QObject isn't working

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 839 Views 2 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.
  • zixuanZ Offline
    zixuanZ Offline
    zixuan
    wrote on last edited by zixuan
    #1

    I'am working on Ubuntu 16.04 and Qt version 5.9.3. I never touched anything to Qt files, but I get an error. Errors:

    In file included from ../../Qt/5.9.3/gcc_64/include/QtCore/QObject:1:0,
                     from ../../Qt/5.9.3/gcc_64/include/QtGui/qopenglcontext.h:48,
                     from ../../Qt/5.9.3/gcc_64/include/QtGui/qopenglfunctions.h:55,
                     from ../../Qt/5.9.3/gcc_64/include/QtGui/QOpenGLFunctions:1:
    
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType)’:
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:256:69: error: expected primary-expression before ‘)’ token
                                receiver, reinterpret_cast<void **>(&slot),
                                                                         ^
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static typename std::enable_if<((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’:
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:267:52: error: expected primary-expression before ‘,’ token
             return connect(sender, signal, sender, slot, Qt::DirectConnection);
                                                        ^
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == (-1)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’:
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:307:52: error: expected primary-expression before ‘,’ token
             return connect(sender, signal, sender, slot, Qt::DirectConnection);
                                                        ^
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static bool QObject::disconnect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2)’:
    ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:371:116: error: expected primary-expression before ‘)’ token
             return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, reinterpret_cast<void **>(&slot),
    

    Note: The "In file included from" only shows files included from Qt files.
    I received this error 7 times.

    Pointing code:

    structMultimer* multimer=new structMultimer("protein-cache-data") //It crashes here
    

    zixuan (talk)

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Unless you are using very old gcc or something up with your kit, did
      you recently use refactor or search and replace?
      In any case, try remove it with maintenance tool and
      add it again.

      1 Reply Last reply
      2
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        and welcome to the forums :)

        1 Reply Last reply
        0
        • zixuanZ Offline
          zixuanZ Offline
          zixuan
          wrote on last edited by
          #4

          Thank you. All I have done is reinstalled Qt and it now works fine.

          zixuan (talk)

          1 Reply Last reply
          1
          • zixuanZ Offline
            zixuanZ Offline
            zixuan
            wrote on last edited by
            #5

            I have updated to include the pointing point.

            zixuan (talk)

            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