Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Computer Vision with OpenCV 3 and Qt5

You're reading from  Computer Vision with OpenCV 3 and Qt5

Product type Book
Published in Jan 2018
Publisher Packt
ISBN-13 9781788472395
Pages 486 pages
Edition 1st Edition
Languages
Author (1):
Amin Ahmadi Tazehkandi Amin Ahmadi Tazehkandi
Profile icon Amin Ahmadi Tazehkandi

Table of Contents (19) Chapters

Title Page
Dedication
Packt Upsell
Foreword
Contributors
Preface
Introduction to OpenCV and Qt Creating Our First Qt and OpenCV Project Creating a Comprehensive Qt+OpenCV Project Mat and QImage The Graphics View Framework Image Processing in OpenCV Features and Descriptors Multithreading Video Analysis Debugging and Testing Linking and Deployment Qt Quick Applications Other Books You May Enjoy

Multi-language support


In this section, you will learn how to create applications that multiple languages using the Qt framework. In fact, it all comes down to a single class that is extremely easy to use. The QTranslator class is the main Qt class responsible for handling internationalization of output (displayed) text. You simply need to make sure of the following:

  1. Use a default language (English, for instance) while you are building your project. This means, simply use sentences and words in the default language for everything that is displayed.
  2. Make sure all literal sentences in your code, or to be specific, all literal sentences that need to be translated when a different language is selected are embraced in a tr() function.

Note

For example, in the code, if you need to write a literal sentence such as Open Input Image (as we did in the Hello_Qt_OpenCV example), simply pass it to a tr function and write tr("Open Input Image") instead. This is not the case with the Designer and only applies...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}