<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8926672353588680785</id><updated>2011-07-31T00:56:13.584-07:00</updated><title type='text'>My Qt Ramblings</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qtramblings.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8926672353588680785/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://qtramblings.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nils Jeisecke</name><uri>http://www.blogger.com/profile/14166531278918620063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8926672353588680785.post-5019297841281399047</id><published>2010-10-28T07:25:00.000-07:00</published><updated>2010-10-28T07:33:52.006-07:00</updated><title type='text'>QDataWidgetMapper annoyances</title><content type='html'>QDataWidgetMapper looks like a nice class to edit database records in a custom dialog. However I found it to have some rather annoying side effects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;it eats the Esc key (by reverting the editor values) so you cannot close the dialog with Esc any longer&lt;/li&gt;&lt;li&gt;If the submit policy is &lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:100%;"  &gt;&lt;span class="Apple-style-span" style="color: rgb(54, 53, 52); line-height: 20px; word-spacing: 5px;font-family:monospace;" &gt;AutoSubmit&lt;/span&gt;&lt;/span&gt;, the cursor in any QLineEdit that is connected to the mapper will not keep its position when switching to another application and back.&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="color: rgb(54, 53, 52); line-height: 20px; word-spacing: 5px;font-size:13px;" &gt;&lt;span style="font-family:times new roman;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Issue #1 can be solved with an eventFilter.&lt;br /&gt;Issue #2 can be solved by using &lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:100%;"  &gt;&lt;span class="Apple-style-span" style="color: rgb(54, 53, 52); line-height: 13px; word-spacing: 5px;font-family:monospace;" &gt;ManualSubmit&lt;/span&gt;&lt;/span&gt; and something like this:&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="color: rgb(54, 53, 52); line-height: 13px; word-spacing: 5px;font-family:monospace;font-size:11px;"  &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre style="margin: 0px; text-indent: 0px;"&gt;connect&lt;span style="color: rgb(0, 0, 0);"&gt;(ui-&gt;saveButton&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 0);"&gt;SIGNAL&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(clicked()),&lt;/span&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;m_mapper&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 0);"&gt;SLOT&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;submit&lt;span style="color: rgb(0, 0, 0);"&gt;()));&lt;/span&gt;&lt;/pre&gt;&lt;style type="text/css"&gt;p, li { white-space: pre-wrap; }&lt;/style&gt; &lt;pre style="margin: 0px; text-indent: 0px;"&gt;connect&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 0);"&gt;this&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 0);"&gt;SIGNAL&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;accepted&lt;span style="color: rgb(0, 0, 0);"&gt;()),&lt;/span&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;m_mapper&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 0);"&gt;SLOT&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;submit&lt;span style="color: rgb(0, 0, 0);"&gt;()));&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8926672353588680785-5019297841281399047?l=qtramblings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtramblings.blogspot.com/feeds/5019297841281399047/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://qtramblings.blogspot.com/2010/10/qdatawidgetmapper-annoyances.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8926672353588680785/posts/default/5019297841281399047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8926672353588680785/posts/default/5019297841281399047'/><link rel='alternate' type='text/html' href='http://qtramblings.blogspot.com/2010/10/qdatawidgetmapper-annoyances.html' title='QDataWidgetMapper annoyances'/><author><name>Nils Jeisecke</name><uri>http://www.blogger.com/profile/14166531278918620063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
