QInputMethod

Charles peacech at gmail.com
Thu Nov 2 17:52:55 GMT 2023


app = qt.QApplication(sys.argv)
inputMethod = app.inputMethod()


On Fri, Nov 3, 2023 at 12:09 AM Yves Brungard <yvesbrungard at orange.fr>
wrote:

> Hello,
>
> I'm trying to get the keyboard layout used by the system.
>
> QInputMethod.locale seems promizing.
>
> However, I do not find any way to use it.
>
> layout = QInputMethod().locale()
>
> gives me PyQt5.QtGui.QInputMethod cannot be instantiated or sub-classed
>
> layout = QInputMethod.locale()
>
> TypeError: locale(self): first argument of unbound method must have type
> 'QInputMethod'
>
> How can I give argument of type QInputMethod if I can not instantiate one?
>
> What is the good syntax to use?
> Yves
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231103/17913f3c/attachment.htm>


More information about the PyQt mailing list