Is it possible to change the Input Keyboard Layouts by programmatically in Pyqt5?
My first and second text box accepts Tamil letters. IN Tamil So many keyboard Layouts available. By default in Windows 10, Tamil Phonetic, Tamil99 and Tamil Traditional Keyboards are available. Now I want to select Keybaord layouts programmatically...
For example. In My First textbox, I need to assign a "Tamil99" keyboard layout and in the second textbox, I need to assign a "Tamil Phonetic" keyboard layout. How to assign it, programmatically?
import sys
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class Diff_Language(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("InPut Different languges in Different Textbox")
self.lbl1 = QLabel("Input Language - Tamil99 Keyboard")
self.lbl2 = QLabel("Input Language - Tamil phonetic keyboard")
self.tbox1 = QLineEdit()
self.tbox1.setFont(QFont('senthamil', 10, QFont.Bold))
self.tbox2 = QLineEdit()
self.tbox2.setFont(QFont('senthamil', 30, QFont.Bold))
self.vbox = QVBoxLayout()
self.vbox.addWidget(self.lbl1)
self.vbox.addWidget(self.tbox1)
self.vbox.addWidget(self.lbl2)
self.vbox.addWidget(self.tbox2)
self.setLayout(self.vbox)
def main():
app = QApplication(sys.argv)
mainscreen = Diff_Language()
app.setStyle("Fusion")
mainscreen.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()