[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: QInputMethod
From:       Charles <peacech () gmail ! com>
Date:       2023-11-02 17:52:55
Message-ID: CABthHP-n4ZiVjL2cyNHA0SA8PsCiyjXaqUd7J8P85mBzL-L63g () mail ! gmail ! com
[Download RAW message or body]

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


On Fri, Nov 3, 2023 at 12:09 AM Yves Brungard <yvesbrungard@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
>
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small" \
class="gmail_default">app = qt.QApplication(sys.argv)</div><div \
style="font-family:arial,helvetica,sans-serif;font-size:small" \
class="gmail_default">inputMethod = app.inputMethod()<br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 3, 2023 at \
12:09 AM Yves Brungard &lt;<a \
href="mailto:yvesbrungard@orange.fr">yvesbrungard@orange.fr</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br> <br>
I&#39;m trying to get the keyboard layout used by the system.<br>
<br>
QInputMethod.locale seems promizing.<br>
<br>
However, I do not find any way to use it.<br>
<br>
layout = QInputMethod().locale()<br>
<br>
gives me PyQt5.QtGui.QInputMethod cannot be instantiated or sub-classed<br>
<br>
layout = QInputMethod.locale()<br>
<br>
TypeError: locale(self): first argument of unbound method must have type <br>
&#39;QInputMethod&#39;<br>
<br>
How can I give argument of type QInputMethod if I can not instantiate one?<br>
<br>
What is the good syntax to use?<br>
Yves<br>
<br>
<br>
<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic