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

Unable to animate QColor with statically compiled QtEmbedded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • None
    • 4.6.3
    • None
    • QtEmbedded 4.6.3 statically compiled for ARM target

    Description

      I'm using QtEmbedded 4.6.3 on an ARM processor, and I compile Qt as a static library to save some start time and memory.

      Recently I tried to start a QPropertyAnimation on a QColor, which works with the "classic" version of Qt (X11/shared), but doesn't with my static library.

      I found out that the QColor interpolation function for animations is declared in qguivariantanimation.cpp:70 in the "qRegisterGuiGetInterpolator" function. This function is declared with the Q_CONSTRUCTOR_FUNCTION macro, so when the application is started with the shared library, the function gets called even before the main function starts, which is OK. However, with the static version, the function never gets called, and then my QColor is not interpolated.

      I found out a similar behavior with QVariant : the QColor helper methods are declared in the qRegisterGuiVariant function, which is also declared with the Q_CONSTRUCTOR_FUNCTION macro. However, this function is also explicitely called in the QApplication constructor, so it works with both the shared and static library.

      Shouldn't the qRegisterGuiGetInterpolator function be called in the QApplication constructor too ? The qRegisterGuiGetInterpolator function has currently no explicit call anywhere in the Qt code, so I believe it is assumed to be done by the library loading. Or maybe there is an option I have to give to my compiler, in order to have the static library properly initialized at start ?

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            cyberwan Erwan MATHIEU
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes