Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved [SOLVED] QQuaternion has no member named conjugated

    General and Desktop
    qt 5.5.1
    3
    9
    1863
    Loading More Posts
    • 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.
    • H
      holzkohlengrill last edited by holzkohlengrill

      The title already explains my problem. When looking up QQuaternion::conjugate() from the documentation (the one in Qt Creator) it is said:

      The following members of class QQuaternion are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
      ...
      Use conjugated() instead.

      But when I use conjugated() I got an error message:

      'class QQuaternion' has no member named 'conjugated'
         m_world.rotate(m_rotation.conjugated());
                                   ^
      

      I am using:

      Qt Creator 3.6.0
      Based on Qt 5.5.1 (MSVC 2013, 32 bit)
      Built on Dec 15 2015 01:01:38
      From revision b52c2f91f5

      kshegunov 1 Reply Last reply Reply Quote 0
      • kshegunov
        kshegunov Moderators @holzkohlengrill last edited by

        @holzkohlengrill
        Hello,
        The method should be available. Have you included the header?

        Kind regards.

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply Reply Quote 0
        • H
          holzkohlengrill last edited by

          I can useconjugate() without any problems and already use quaternions in my program. So this should not be the reason.

          kshegunov 1 Reply Last reply Reply Quote 0
          • kshegunov
            kshegunov Moderators @holzkohlengrill last edited by

            @holzkohlengrill
            Are you using Qt 4? It doesn't seem to be the case, since there no such method in Qt 4.

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply Reply Quote 0
            • H
              holzkohlengrill last edited by holzkohlengrill

              Version 5.4.2 is used.
              This is odd because it is not using the version stated in the "About Qt Creator..." dialog.
              However a version of Qt5 is used, so it should work.. any other suggestions?

              1 Reply Last reply Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion last edited by

                hi
                maybe a silly question
                http://doc.qt.io/qt-5/qquaternion.html#conjugated

                it says
                This function was introduced in Qt 5.5.

                so would not be there in Version 5.4.2 ?
                Or ??

                1 Reply Last reply Reply Quote 1
                • H
                  holzkohlengrill last edited by holzkohlengrill

                  That makes sense. I wasn't thinking about that again because Qt Creator showed me 5.5.1 then I found out that this was not true.
                  Now it is clear why it is not working but why is it then using 5.4.2 (this is what qDebug() << "Qt " << QT_VERSION_STR;shows me) instead of 5.5.1?

                  kshegunov 1 Reply Last reply Reply Quote 0
                  • kshegunov
                    kshegunov Moderators @holzkohlengrill last edited by

                    @holzkohlengrill
                    Qt creator is an IDE. It can be linked against pretty much any version of Qt and this is in no way connected to what version of Qt you use for developing. For example, my Qt creator uses Qt 5.5 (as well), but I have binaries (the library itself) for versions 5.5, 5.6 and the development branch from the repositories.

                    Read and abide by the Qt Code of Conduct

                    1 Reply Last reply Reply Quote 1
                    • H
                      holzkohlengrill last edited by holzkohlengrill

                      Now I realised what my mistake was. When you click (in project settings) on a different kit it is automatically enabled.
                      I thought the version will only be changed when you choose one with the button (computer symbol) in the bottom left corner.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post