Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Since Qt 5.1x, QQuickImage supoorts OpenGL Texture Files such as PKM, KTX, ASTC
https://doc.qt.io/qt-5/qml-qtquick-image.html
OpenGL Texture Files
When the default OpenGL scene graph backend is in use, images can also be supplied in compressed texture files. The content must be a simple RGB(A) format 2D texture. Supported compression schemes are only limited by the underlying OpenGL driver and GPU. The following container file formats are supported:
- PKM (since Qt 5.10)
- KTX (since Qt 5.11)
- ASTC (since Qt 5.13)
However ImageSelector (from QtQuick.Controls.Imagine) does not support PKM, KTX, ASTC because of below code
qtquickcontrols2/src/imports/controls/imagine/qquickimageselector.cpp
QStringList QQuickImageSelector::fileExtensions() const { static const QStringList extensions = QStringList() << QStringLiteral("png"); return extensions; }
and there is no Q_PROPERTY setter to set fileExtensions.
Moreover we cannot inherit qquickimageselector_p.h to make custom ImageSelector because it's internal and qquickimageselector_p.h is not shipped in Qt installation directory.
In my humble opinion, we have to provide the way to select PKM, KTX, ASTC images via ImageSelector because QQuickImage supports them.
Please see the attached test QML file. (image_test2.qml)
Attachments
Issue Links
- relates to
-
QTBUG-98937 KTX, ASTC image not displayed on Qt 6.2 and above
-
- Closed
-