Image::mipmap is an 'invalid property'
-
I've just upgraded from Qt 5.2 to 5.3 with the latest and greatest Qt Creator 3.1.1. I want to try out the new mipmap property added to the QML Image type (see "Image::mipmap":http://qt-project.org/doc/qt-5/qml-qtquick-image.html#mipmap-prop), but Qt Creator marks the property as an 'invalid property name' in the QML editor and the application crashes if I try to run it.
Before upgrading, I uninstalled Qt 5.2 and removed C:\Qt entirely. In Projects > Build & Run, it says I'm building against Desktop Qt 5.3.0 MinGW 32bit. So there's no way it's still building against 5.2, is there?
What am I doing wrong?
@Image {
source: "image.png"width: 10 height: 10 mipmap: true // Causes crash.
}@
-
I've reported this as a bug since I'm pretty sure I'm running Qt 5.3: "QTBUG-39302":https://bugreports.qt-project.org/browse/QTBUG-39302
-
Hi and welcome to devnet,
You should also post a minimal compilable example that shows the behavior. This way it ensures that the developer and you are testing using the same pieces of code with the same data.
-
Thanks for your help SGaist.
I found the problem - apparently the mipmap property was added to QtQuick 2.3 so a wrong import statement caused the problem.
This works:
@import QtQuick 2.3
Image {mipmap: true}@I've closed the bug report in JIRA.
The "Image page":http://qt-project.org/doc/qt-5/qml-qtquick-image.html says Import Statement: QtQuick 2.2, which is what misled me. Can you update the page accordingly?
-
It's still a bug, but a documentation bug, a fix is on its way
-
Thanks SGaist! Wish I could help out with the docs, but I guess I'll have to spam the forums some more first.
-
Well, you can help, no problem with that :)