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. Removing language button from QtVK
Forum Updated to NodeBB v4.3 + New Features

Removing language button from QtVK

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 228 Views
  • 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.
  • C Offline
    C Offline
    Circuits
    wrote on last edited by Circuits
    #1

    I found some code that allows me to remove the language button from the QtVK:

    property var keyboardLayout: inputPanel.keyboard.layout
    
    
            function findChildByProperty(parent, propertyName, propertyValue, compareCb) {
                var obj = null
                if (parent === null)
                    return null
                var children = parent.children
                for (var i = 0; i < children.length; i++) {
                    obj = children[i]
                    if (obj.hasOwnProperty(propertyName)) {
                        if (compareCb !== null) {
                            if (compareCb(obj[propertyName], propertyValue))
                                break
                        } else if (obj[propertyName] === propertyValue) {
                            break
                        }
                    }
                    obj = findChildByProperty(obj, propertyName, propertyValue, compareCb)
                    if (obj)
                        break
                }
                return obj
            }
    
    
    
            onKeyboardLayoutChanged: {
                if(keyboardLayout!==""){
                    var ChangeLanguageKey= findChildByProperty(inputPanel.keyboard, "objectName", "changeLanguageKey", null)
                    if(ChangeLanguageKey){
                        ChangeLanguageKey.visible=false
                    }
                }
            }
    

    Is there still a way for me to toggle the language? For instance, could I use an index to specify the language using the VirtualKeyboardSettings.local() function or does removing this button completely remove the ability to toggle languages?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Circuits
      wrote on last edited by
      #2

      Oh.. turns out I should have paid closer attention in those 3'rd grade spelling courses, it's locale not local.

      1 Reply Last reply
      1

      • Login

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