Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. change the layout of keyboard!
Qt 6.11 is out! See what's new in the release blog

change the layout of keyboard!

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 586 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alirezatkh2
    wrote on last edited by
    #1

    hi every body,
    I have a virtual keyboard widget which has a lot of pushbuttons as keys! I used tr() function to name the pushbuttons. there is a key which changes the layout of keyboard to another language. when I change the language by :

    QTranslator     qtTranslator;
    qtTranslator.load("virtualBoard_fa");
    qApp->installTranslator(&qtTranslator);
    

    I dont know how to refresh pushbuttons to show new layout to the user. any idea?
    any idea to refresh a widget with a lot of pushbuttons to change their names by tr() function!

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #2

      See the docs for installTranslator. You need to react to the LanguageChanged event and call tr for your buttons again. Example here.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved