Issue with Porting PropertyBrowser framework to Qt 5.1



  • hi all,
    I am trying to port my application to Qt5 and most of the code is successfully ported to Qt5. Currently i am facing an issue with porting the Property Browser framework to Qt5. I have taken the new Property Browser framework code from the Qt 5 source git repository. When i am trying to compile i am getting this error, "invalid application of 'sizeof' to incomplete type 'QStaticAssertFailure<false>" in file qglobal.h when i am using qMetaTypeId() method. The code in qvariantproperty.cpp which causes this issue is given below,
    @QT_BEGIN_NAMESPACE
    class QtEnumPropertyType
    {
    };
    class QtFlagPropertyType
    {
    };
    class QtGroupPropertyType
    {
    };
    QT_END_NAMESPACE
    Q_DECLARE_METATYPE(QtEnumPropertyType)
    Q_DECLARE_METATYPE(QtFlagPropertyType)
    Q_DECLARE_METATYPE(QtGroupPropertyType)
    QT_BEGIN_NAMESPACE
    int QtVariantPropertyManager::enumTypeId()
    {
    return qMetaTypeId<QtEnumPropertyType>();
    }
    int QtVariantPropertyManager::flagTypeId()
    {
    return qMetaTypeId<QtFlagPropertyType>();
    }@

    I am able to generate the DLL file using this Property Browser framework by replacing "return qMetaTypeId<QtEnumPropertyType>()" with "return 0". But if i am using like this then i will not be able to use Enum type property inside my Property Sheet. Is there any solution to overcome this issue?



  • Is this the repo you tried:
    "git://gitorious.org/qt-solutions/qt-solutions.git":git://gitorious.org/qt-solutions/qt-solutions.git
    Listed on:
    "http://qt.gitorious.org/qt-solutions/":http://qt.gitorious.org/qt-solutions/

    That one worked for me on Ubuntu, Windows, and OS X. But I was getting macdeployqt difficulties in release build.



  • Hi Boyle,
    I have downloaded the new code from the repo which you have mentioned. But the same problem persists. Currently i am trying to build on Windows. I have tried to build "simple" inside the example directory and it shows the same error which i have mentioned above. Do i have to do any modification before building the source code?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.