Il 18/08/20 16:28, Jérôme Laheurte ha scritto:
The « split(‘-‘)[0] » part looks like a big code smell to me, but what should I do ?
There's no need, load() should already do the split internally and search for the right thing. Maybe you just need to load "qtbase_" (or specify "_" as the prefix string). See
https://doc.qt.io/qt-5/qtranslator.html#load-1
https://doc.qt.io/qt-5/internationalization.html#example-basic-qt-modules
https://www.kdab.com/fixing-a-common-antipattern-when-loading-translations-in-qt/
HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest