<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Can we Get Previous Cursor Address]]></title><description><![CDATA[<p dir="auto">Hi every one I am new to Qt<br />
I have one QDialog in that i kept one QtableWidget<br />
and also iam having two Push Buttons<br />
One Button is for adding Rows dynamically to Qtablewidget<br />
and another push button is for Calculating sum of Columns</p>
<p dir="auto">here my problem<br />
my Tab key is at “Sum” Button<br />
when i pressed Shift+Tab key<br />
Tab position is moving to last but one Row<br />
What i want is It should move to last Row</p>
<p dir="auto">Sorry my english not so good, I hope You understand my problem<br />
can any one help in this problem<br />
Thanks in advance</p>
]]></description><link>https://forum.qt.io/topic/25355/can-we-get-previous-cursor-address</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 15:57:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/25355.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 Mar 2013 11:57:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can we Get Previous Cursor Address on Fri, 22 Mar 2013 12:01:55 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="petergollapalli" date="1363946230"]where should i include this code<br />
[/quote]</p>
<p dir="auto">The "eventFilter is a virtual method of class QObject":<a href="http://qt-project.org/doc/qt-5.0/qtcore/qobject.html#eventFilter" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5.0/qtcore/qobject.html#eventFilter</a>. The example that I gave is for implementation at a class that inherits "QMainWindow":<a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qmainwindow.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5.0/qtwidgets/qmainwindow.html</a>.</p>
]]></description><link>https://forum.qt.io/post/171118</link><guid isPermaLink="true">https://forum.qt.io/post/171118</guid><dc:creator><![CDATA[leon.anavi]]></dc:creator><pubDate>Fri, 22 Mar 2013 12:01:55 GMT</pubDate></item><item><title><![CDATA[Reply to Can we Get Previous Cursor Address on Fri, 22 Mar 2013 09:57:10 GMT]]></title><description><![CDATA[<p dir="auto">where should i include this code</p>
]]></description><link>https://forum.qt.io/post/171089</link><guid isPermaLink="true">https://forum.qt.io/post/171089</guid><dc:creator><![CDATA[petergollapalli]]></dc:creator><pubDate>Fri, 22 Mar 2013 09:57:10 GMT</pubDate></item><item><title><![CDATA[Reply to Can we Get Previous Cursor Address on Thu, 21 Mar 2013 12:38:11 GMT]]></title><description><![CDATA[<p dir="auto">Did you try the solution that I proposed yesterday?</p>
]]></description><link>https://forum.qt.io/post/170967</link><guid isPermaLink="true">https://forum.qt.io/post/170967</guid><dc:creator><![CDATA[leon.anavi]]></dc:creator><pubDate>Thu, 21 Mar 2013 12:38:11 GMT</pubDate></item><item><title><![CDATA[Reply to Can we Get Previous Cursor Address on Wed, 20 Mar 2013 12:32:35 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="petergollapalli" date="1363780662"]<br />
here my problem<br />
my Tab key is at “Sum” Button<br />
when i pressed Shift+Tab key<br />
Tab position is moving to last but one Row<br />
What i want is It should move to last Row<br />
[/quote]</p>
<p dir="auto">In my opinion you can achieve this behavior if you handle the focus event of QTableWidget using "eventFilter":<a href="http://qt-project.org/doc/qt-4.8/qobject.html#eventFilter" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-4.8/qobject.html#eventFilter</a> and select the last row. The source code should be something similar to (please note that I have not tested it):</p>
<p dir="auto">@<br />
bool MainWindow::eventFilter(QObject *obj, QEvent *event)<br />
{<br />
if (obj == pMyTable)<br />
{<br />
if ( QEvent::FocusIn == event-&gt;type() )<br />
{<br />
pMyTable-&gt;selectRow(pMyTable-&gt;rowCount() - 1);<br />
return true;<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
else<br />
{<br />
// pass the event on to the parent class<br />
return QMainWindow::eventFilter(obj, event);<br />
}<br />
}<br />
@</p>
]]></description><link>https://forum.qt.io/post/170836</link><guid isPermaLink="true">https://forum.qt.io/post/170836</guid><dc:creator><![CDATA[leon.anavi]]></dc:creator><pubDate>Wed, 20 Mar 2013 12:32:35 GMT</pubDate></item></channel></rss>