Thursday, August 10, 2017

Internationalization with Qt VS Tools

The good news for people using Qt VS Tools addin is that translations work very well from within the Visual Studio environment. The whole lifecycle of translations in Qt, that is:

  • use tr() method to wrap all translatable strings
  • create the .ts files with lupdate command
  • translate using Linguist
  • create the compiled .qm files with lrelease command
can be carried on without any issues, see more information here.

Monday, August 7, 2017

Qt on Android: browsing files from device with QFileDialog widget in Linux

I was developing an Android application with Qt using a real device connected to my laptop with Lubuntu, and I needed to open files created by such application on Android's file system directly from my PC. The thing is, the device was auto-mounted whenever I connected it, and showing properly in the file manager (something like mtp://[usb:001,007]/), but while using QFileDialog::getOpenFileName there was no way to find the device and browse its folder structure.