<div dir="ltr"><div dir="ltr"><div>Hi<br></div>I Have found an answer to this problem but still I want to know how to set a bigger font for pop-up window :<br> <br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.1pt"><span style="color:rgb(0,0,128);font-weight:bold">class </span>CustomCompleter(QCompleter):<br>    <span style="color:rgb(0,0,128);font-weight:bold">def </span><span style="color:rgb(178,0,178)">__init__</span>(<span style="color:rgb(148,85,141)">self</span>):<br>        <span style="color:rgb(0,0,128)">super</span>().<span style="color:rgb(178,0,178)">__init__</span>()<br>    <span style="color:rgb(0,0,128);font-weight:bold">def </span>splitPath(<span style="color:rgb(148,85,141)">self</span>,path):<br>        <span style="color:rgb(0,0,128);font-weight:bold">if </span>path.endswith(<span style="color:rgb(0,128,128);font-weight:bold">'ا'</span>):<br>            <span style="color:rgb(148,85,141)">self</span>.setModel(QStringListModel([<span style="color:rgb(0,128,128);font-weight:bold">'أ'</span>, <span style="color:rgb(0,128,128);font-weight:bold">'إ'</span>, <span style="color:rgb(0,128,128);font-weight:bold">'آ'</span>, <span style="color:rgb(0,128,128);font-weight:bold">'</span><span style="color:rgb(0,128,128);font-weight:bold;font-family:"Aldhabi"">ٱ</span><span style="color:rgb(0,128,128);font-weight:bold">'</span>]))<br>        <span style="color:rgb(0,0,128);font-weight:bold">elif </span>path.endswith(<span style="color:rgb(0,128,128);font-weight:bold">'ی'</span>):<br>            <span style="color:rgb(148,85,141)">self</span>.setModel(QStringListModel([<span style="color:rgb(0,128,128);font-weight:bold">'ي'</span>,<span style="color:rgb(0,128,128);font-weight:bold">'</span><span style="color:rgb(0,128,128);font-weight:bold;font-family:"Aldhabi"">ىٰ</span><span style="color:rgb(0,128,128);font-weight:bold">'</span>,<span style="color:rgb(0,128,128);font-weight:bold">'ئ'</span>]))<br>        <span style="color:rgb(0,0,128);font-weight:bold">elif </span>path.endswith(<span style="color:rgb(0,128,128);font-weight:bold">'ک'</span>):<br>            <span style="color:rgb(148,85,141)">self</span>.setModel(QStringListModel([<span style="color:rgb(0,128,128);font-weight:bold">'ك'</span>]))<br>        <span style="color:rgb(0,0,128);font-weight:bold">else</span>:<br>            <span style="color:rgb(0,0,128);font-weight:bold">return </span>[]<br>        <span style="color:rgb(0,0,128);font-weight:bold">return </span>[]<br><br>e = QLineEdit()<br>c = CustomCompleter()<br>e.setCompleter(c)<br></pre></div></div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 5, 2018 at 4:55 PM Maziar Parsijani <<a href="mailto:maziar.parsijani@gmail.com" target="_blank">maziar.parsijani@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi<br></div>I use the following code for qcompleter .In this method if you write "c" then you can just choose  "completion" or any other is starts with "c" in the stringlist.<br><pre dir="ltr" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6" lang="en"><span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-String"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String"></span></span></pre><pre dir="ltr" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6" lang="en"><span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-ResWord">def</span> <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">get_data</span>(<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">model</span>):</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_6"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-6-1"></span>    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">model</span>.<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">setStringList</span>([<span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">completion</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span>, <span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">data</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span>, <span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">goes</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span>, <span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">here</span><span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span>])</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_7"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-7-1"></span></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-line">    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">edit</span> = <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">QLineEdit</span>()</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_12"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-12-1"></span>    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">completer</span> = <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">QCompleter</span>()</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_13"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-13-1"></span>    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">edit</span>.<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">setCompleter</span>(<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">completer</span>)</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_14"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-14-1"></span></span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_15"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-15-1"></span>    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">model</span> = <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">QStringListModel</span>()</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_16"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-16-1"></span>    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">completer</span>.<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">setModel</span>(<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">model</span>)</span>
<span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-LineAnchor" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6_17"></span><span class="m_-8008384416387858440m_-6951080420850174135gmail-anchor" id="m_-8008384416387858440m_-6951080420850174135gmail-line-17-1"></span>    <span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">get_data</span>(<span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">model</span>)</span></pre> how could I replace a character that is not related to the input.for example :<br></div><div>   <br><pre dir="ltr" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6" lang="en"><span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">StringList</span>([<span class="m_-8008384416387858440m_-6951080420850174135gmail-String">"</span>b","a","c","d"]) </span></pre></div><div>I want to be able when a key like  <b><font size="4">"h"</font></b> pressed or input the completer menu appears and would be able to choose "b"or"a"or"c"or"d" and <font size="4"><b>replace</b></font> it in the qlineedit character.<br></div><div><pre dir="ltr" id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6" lang="en"><span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><span class="m_-8008384416387858440m_-6951080420850174135gmail-ID">    </span><br></span></pre><pre id="m_-8008384416387858440m_-6951080420850174135gmail-CA-4a740dd9ec74d342f1fd7cf168ceb0b12629eab6" lang="en"><span class="m_-8008384416387858440m_-6951080420850174135gmail-line"><br></span></pre></div></div></div></div></div></div></div>
</blockquote></div>