Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15
-
None
-
Ubuntu 20.04
GCC 9.3.0
Qt 5.15.1
Description
Hi!
I'm using a DelegateModelGroup inside a DelegateModel to filter some items of a GridView.
Besides, my application needs to be translated into several languages.
When I change the language by calling retranslate() on my QQmlApplicationEngine, all the items disappear...
I saw the following limitation in the documentation of QQmlApplicationEngine::retranslate:
Note: Due to a limitation in the implementation, this function refreshes all the engine's bindings, not only those that use strings marked for translation. This may be optimized in a future release.
As DelegateModelGroup' use is based on its 'name' property (which is a string), I think the issue come from there.
Steps to reproduce
Attached files are a minimal CMake project that shows the issue. Here are the steps to reproduce:
mkdir build cd build cmake -DCMAKE_PREFIX_PATH=/path/to/your/Qt/gcc_64 .. make -j 6
Launch the 'my_target' executable and click the 'Translate' button.
--> all items in the GridView disappear