<div dir="ltr"><div dir="ltr">Hi Thomas<div><br></div><div>Like this?</div><div><br></div><div><div>diff --git a/kmymoney/dialogs/kcurrencycalculator.cpp b/kmymoney/dialogs/kcurrencycalculator.cpp</div><div>index bf5874d2e..ed3135fb0 100644</div><div>--- a/kmymoney/dialogs/kcurrencycalculator.cpp</div><div>+++ b/kmymoney/dialogs/kcurrencycalculator.cpp</div><div>@@ -143,6 +143,10 @@ public:</div><div>       ui->m_amountButton->hide();</div><div>       ui->m_toAmount->hide();</div><div>     }</div><div>+    q->setTabOrder(ui->m_amountButton, ui->m_toAmount);</div><div>+    q->setTabOrder(ui->m_toAmount, ui->m_dateEdit);</div><div>+    q->setTabOrder(ui->m_dateEdit, ui->m_updateButton);</div><div>+    q->setTabOrder(ui->m_updateButton, ui->buttonBox);</div><div>   }</div><div> </div><div>   void updateExample(const MyMoneyMoney& price)</div></div><div><br></div><div><br></div><div>Still not working :-(</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 25, 2019 at 9:37 AM Thomas Baumgart <<a href="mailto:thb@net-bembel.de">thb@net-bembel.de</a>> 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"><u></u>
<div style="font-family:monospace;font-size:10pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">Hi José,</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">On Montag, 25. Februar 2019 13:14:15 CET José Arthur Benetasso Villanova wrote:</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> Hi.</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> I'm trying to make the tab key work properly in kcurrencycalculator and in</p>
<p style="margin:0px;text-indent:0px">> budget windows, specially in the budget, that I'm using heavily those days.</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> I tried to put code this code in KCurrencyCalculatorPrivate or some</p>
<p style="margin:0px;text-indent:0px">> variation of this, but without any effect:</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> diff --git a/kmymoney/dialogs/kcurrencycalculator.cpp</p>
<p style="margin:0px;text-indent:0px">> b/kmymoney/dialogs/kcurrencycalculator.cpp</p>
<p style="margin:0px;text-indent:0px">> index bf5874d2e..19eb744b9 100644</p>
<p style="margin:0px;text-indent:0px">> --- a/kmymoney/dialogs/kcurrencycalculator.cpp</p>
<p style="margin:0px;text-indent:0px">> +++ b/kmymoney/dialogs/kcurrencycalculator.cpp</p>
<p style="margin:0px;text-indent:0px">> @@ -73,6 +73,11 @@ public:</p>
<p style="margin:0px;text-indent:0px">>      m_date(date),</p>
<p style="margin:0px;text-indent:0px">>      m_resultFraction(resultFraction)</p>
<p style="margin:0px;text-indent:0px">>    {</p>
<p style="margin:0px;text-indent:0px">> +      qq->setTabOrder(ui->m_amountButton, ui->m_toAmount);</p>
<p style="margin:0px;text-indent:0px">> +      qq->setTabOrder(ui->m_toAmount, ui->m_dateEdit);</p>
<p style="margin:0px;text-indent:0px">> +      qq->setTabOrder(ui->m_dateEdit, ui->m_updateButton);</p>
<p style="margin:0px;text-indent:0px">> +      qq->setTabOrder(ui->m_updateButton, ui->buttonBox);</p>
<p style="margin:0px;text-indent:0px">> +</p>
<p style="margin:0px;text-indent:0px">>    }</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">>    ~KCurrencyCalculatorPrivate()</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> How can I achieve this? Thanks in advance.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">You are calling the setTabOrder too early. The widgets already exist at this point but are not yet 'setup'.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Try to drop your code sequence into init() after the call to</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">   ui->setupUi(q)</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Make sure to replace 'qq' with a simple 'q' at this point. It is the same thing and provided by Q_Q(KCur ...).</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">In setupUi (it's the generated code from the Qt-Designer ui file), the taborder will be setup according to the instructions made in Qt-Designer and since they are executed *after* the ctor - where you try to setup the order - they will override what you have done. </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">You can find this generated file in the build directory as</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">  ui_kcurrencycalculator.h</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Hope this helps. I know, it's not obvious if you have little knowledge about the underlying (Qt-) mechanisms.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">-- </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Regards</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Thomas Baumgart</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px"><a href="https://www.signal.org/" target="_blank">https://www.signal.org/</a>       Signal, the better WhatsApp</p>
<p style="margin:0px;text-indent:0px">-------------------------------------------------------------</p>
<p style="margin:0px;text-indent:0px">The Unix Guru's View of Sex:</p>
<p style="margin:0px;text-indent:0px">============================</p>
<p style="margin:0px;text-indent:0px"># unzip; strip; touch; finger; mount; fsck; more; yes; umount; sleep</p>
<p style="margin:0px;text-indent:0px">-------------------------------------------------------------</p>
<p style="margin:0px;text-indent:0px"> </p></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">José Arthur Benetasso Villanova</div>