Diego Donate
Programmer
Hi,
In my Qt application I have some .ts files for languages in my application resources, so I access translations with tr("") from a C++ class, and with qsTr("") from a QML file
I also have a WebEngineView + WebChannel, with a custom HTML file and JS files associated.
In this JS code, I have a custom context menu:
Using the 'build' callback, I can set a name dinamically every time my menu is open:
$(document).contextMenu({
selector: 'span.context-menu',
build: function($triggerElement, e){
return {
items: {
copy: { name: [text depending on the language]
...
My problem is how to access to my .ts files from this JS code. For example, I need context menu translated texts
Thanks in advance, Diego
In my Qt application I have some .ts files for languages in my application resources, so I access translations with tr("") from a C++ class, and with qsTr("") from a QML file
I also have a WebEngineView + WebChannel, with a custom HTML file and JS files associated.
In this JS code, I have a custom context menu:
Using the 'build' callback, I can set a name dinamically every time my menu is open:
$(document).contextMenu({
selector: 'span.context-menu',
build: function($triggerElement, e){
return {
items: {
copy: { name: [text depending on the language]
...
My problem is how to access to my .ts files from this JS code. For example, I need context menu translated texts
Thanks in advance, Diego