2

I've been using QTextBrowser to display log files. The Debug build works properly with non-English characters after setting the proper font. But when building it in Release mode, it displays empty rectangles for the non-English characters no matter what the font is. Copying the output text into Word displays the correct characters so the output generation isn't the problem.
What am I missing here and how can I fix it?

shebaw
  • 1,775
  • 1
  • 13
  • 15
  • Strange. Never experienced this. You may provide the platform, and the compiler. On Linux you may check with strace and lsof if the font is opened by the application. – Valentin H May 29 '15 at 11:13
  • Which OS are you on? – Frank Osterfeld May 29 '15 at 11:18
  • I'm on Windows using MSVC10 compiler. Yes it's strange, probably an issue with my PC since Qt5 applications (ViberPC, e.t.c.) display empty boxes too. Qt4 applications work though. – shebaw May 29 '15 at 11:50

1 Answers1

2

Usually debug and release outputs are created in separate directories and often use different environment variables. Check your .pro, make or solution files.

If the application loads a file (e.g. font) from not absolute directory, the file may be missing. If you copied some user-data (e.g. again font) in /debug directory, check, that this data is also in /release.

Valentin H
  • 7,240
  • 12
  • 61
  • 111
  • Thanks. But the application is using system fonts and the text's font gets set. The non-English parts are rendered correctly so I can see that the font is set. – shebaw May 29 '15 at 10:57
  • Does it work if you start it as release within your IDE? – fassl May 29 '15 at 12:24
  • @fassl, it doesn't work. I've made both the debug and the release builds share the same working directory and even dded a font selector to change the fonts on the fly. It displays the characters on debug builds but not on release builds. – shebaw May 30 '15 at 08:17