<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/4.0.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>KBlog</title>
		<link>http://www.ukdragon.com/blog/index.php/index/</link>
		<atom:link rel="self" type="application/rss+xml" href="http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2" />
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=4.0.3"/>
		<ttl>60</ttl>
				<item>
			<title>Dynamically removing QWidgets from a QLayout</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2011/08/25/dynamicaly-removing-qwidgets-from-a</link>
			<pubDate>Thu, 25 Aug 2011 19:25:00 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="alt">Computing</category>
<category domain="alt">Programming</category>
<category domain="alt">c++</category>
<category domain="main">Qt</category>			<guid isPermaLink="false">79@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;I&amp;#8217;ve seen some strange things when trying to remove QWidgets from a QLayout while using code such as:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;MyWidget-&amp;gt;layout()-&amp;gt;removeWidget(AnotherWidget);&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sometimes &lt;em&gt;AnotherWidget&lt;/em&gt; wouldn&amp;#8217;t be removed, sometimes it would display only part of it.&lt;/p&gt;

&lt;p&gt;After a bit of searching I came across a different solution that worked a treat. The below code removes all widgets MyWidget&amp;#8217;s layout.&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;while((QLayoutItem *child = MyWidget-&amp;gt;layout()-&amp;gt;takeAt(0)) != 0) &lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;{&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;delete child-&amp;gt;widget();&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;delete child;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;And if you wanted to only remove a single widget from the layout:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;while((QLayoutItem *child = MyWidget-&amp;gt;layout()-&amp;gt;takeAt(0)) != 0) &lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;{&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if(child == AnotherWidget)&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;delete child-&amp;gt;widget();&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;delete child;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc8&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Source: &lt;a href=&quot;http://www.qtcentre.org/archive/index.php/t-21561.html&quot;&gt;http://www.qtcentre.org/archive/index.php/t-21561.html&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2011/08/25/dynamicaly-removing-qwidgets-from-a&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen some strange things when trying to remove QWidgets from a QLayout while using code such as:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">MyWidget-&gt;layout()-&gt;removeWidget(AnotherWidget);</span></code></td></tr>
</table></div>

<p>Sometimes <em>AnotherWidget</em> wouldn&#8217;t be removed, sometimes it would display only part of it.</p>

<p>After a bit of searching I came across a different solution that worked a treat. The below code removes all widgets MyWidget&#8217;s layout.</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">while((QLayoutItem *child = MyWidget-&gt;layout()-&gt;takeAt(0)) != 0) </span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">{</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;delete child-&gt;widget();</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;delete child;</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default">}</span></code></td></tr>
</table></div>

<p>And if you wanted to only remove a single widget from the layout:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">while((QLayoutItem *child = MyWidget-&gt;layout()-&gt;takeAt(0)) != 0) </span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">{</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;if(child == AnotherWidget)</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;{</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;delete child-&gt;widget();</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;delete child;</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"></div></td><td><code><span class="amc_default">&#160;&#160;&#160;&#160;}</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc8"></div></td><td><code><span class="amc_default">}</span></code></td></tr>
</table></div>

<p>Source: <a href="http://www.qtcentre.org/archive/index.php/t-21561.html">http://www.qtcentre.org/archive/index.php/t-21561.html</a></p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2011/08/25/dynamicaly-removing-qwidgets-from-a">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2011/08/25/dynamicaly-removing-qwidgets-from-a#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=79</wfw:commentRss>
		</item>
				<item>
			<title>Using 3CXPhone with Sipgate</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2011/03/11/using-3cxphone-with-sipgate</link>
			<pubDate>Fri, 11 Mar 2011 14:17:00 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="alt">Windows</category>
<category domain="main">Windows 7</category>			<guid isPermaLink="false">77@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;Sipgate&amp;#8217;s own software phone doesn&amp;#8217;t work on Windows 7 so I had to find an alternative and chose &lt;a href=&quot;http://www.3cx.com/VOIP/voip-phone.html&quot;&gt;3CXPhone&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s taken a little time to get it to connect to my Sipgate account so here is the configuration I used to get it to work:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.ukdragon.com/blog/media/blogs/index/sipgate3cxphone/sipgateconfig.png&quot; alt=&quot;3CXPhone Configuration for Sipgate&quot; title=&quot;3CXPhone Configuration for Sipgate&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Account name and Caller ID can be anything you like.&lt;/p&gt;

&lt;p&gt;Change &amp;#8220;Extension&amp;#8221; and &amp;#8220;ID&amp;#8221; to your Sipgate ID.&lt;/p&gt;

&lt;p&gt;You also need to set the STUN server by clicking on &amp;#8220;Advanced Settings&amp;#8221; from the Configuration window:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.ukdragon.com/blog/media/blogs/index/sipgate3cxphone/sipgateadvancedsettings.png&quot; alt=&quot;3CXPhone Advanced Settings for Sipgate&quot; title=&quot;3CXPhone Advanced Settings for Sipgate&quot; /&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2011/03/11/using-3cxphone-with-sipgate&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Sipgate&#8217;s own software phone doesn&#8217;t work on Windows 7 so I had to find an alternative and chose <a href="http://www.3cx.com/VOIP/voip-phone.html">3CXPhone</a>.</p>

<p>It&#8217;s taken a little time to get it to connect to my Sipgate account so here is the configuration I used to get it to work:</p>

<p><img src="http://www.ukdragon.com/blog/media/blogs/index/sipgate3cxphone/sipgateconfig.png" alt="3CXPhone Configuration for Sipgate" title="3CXPhone Configuration for Sipgate" /></p>

<p>Account name and Caller ID can be anything you like.</p>

<p>Change &#8220;Extension&#8221; and &#8220;ID&#8221; to your Sipgate ID.</p>

<p>You also need to set the STUN server by clicking on &#8220;Advanced Settings&#8221; from the Configuration window:</p>

<p><img src="http://www.ukdragon.com/blog/media/blogs/index/sipgate3cxphone/sipgateadvancedsettings.png" alt="3CXPhone Advanced Settings for Sipgate" title="3CXPhone Advanced Settings for Sipgate" /></p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2011/03/11/using-3cxphone-with-sipgate">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2011/03/11/using-3cxphone-with-sipgate#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=77</wfw:commentRss>
		</item>
				<item>
			<title>Using the "Key Magic" with One For All remote</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2010/10/11/using-the-key-magic-with-one-for-all-remote</link>
			<pubDate>Mon, 11 Oct 2010 18:21:50 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="main">Bash</category>			<guid isPermaLink="false">76@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;I recently purchased a One for All remote (URC-7940 in this case) to use with my DVD player. All was going well until I wanted to program individual keys to some functions that weren&amp;#8217;t working.&lt;/p&gt;

&lt;p&gt;The user manual that came with the remote boasted that it had a &amp;#8220;Key Magic&amp;#8221; function that allowed me to do just this! However it neglected to tell me how. After more searching than should have been required I finally found &lt;a href=&quot;http://www.amazon.co.uk/gp/forum/cd/discussion.html/ref=cm_cd_et_md_pl?ie=UTF8&amp;amp;cdForum=Fx1WX1FVWDH63CA&amp;amp;cdMsgNo=32&amp;amp;cdPage=2&amp;amp;asin=B0027FFX4O&amp;amp;store=electronics&amp;amp;cdSort=oldest&amp;amp;cdThread=Tx2WDHEL5BEMPSI&amp;amp;cdMsgID=Mx3IDGGYU2DEH4K#Mx3IDGGYU2DEH4K&quot;&gt;a post on a forum&lt;/a&gt; that mentioned how to program a button. &lt;/p&gt;

&lt;p&gt;To program a button you must first get a 5 digit function for the device you&amp;#8217;re trying to program the remote for. These functions are called &amp;#8220;EFCs&amp;#8221; and you can usually find them using a search engine. For instance I found my device&amp;#8217;s EFCs &lt;a href=&quot;http://www.remotecentral.com/cgi-bin/mboard/whichremote/thread.cgi?1592&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Anyway the procedure is as follows:&lt;/p&gt;

&lt;p&gt; 1. Hold the &amp;#8216;M&amp;#8217; button (Key &lt;strong&gt;M&lt;/strong&gt;agic) until the red light on the control blinks twice&lt;br /&gt;
 2. On the remote press the buttons &amp;#8220;994&amp;Prime;. The red light should blink twice. &lt;br /&gt;
 3. Press &amp;#8216;M&amp;#8217; again. The red light will blink once more. You are now in Key Magic mode&lt;br /&gt;
 4. Enter your 5 digit code for the function.&lt;br /&gt;
 5. Finally press the key you want to assign the function to. The red light will blink twice more to confirm you&amp;#8217;re back in normal mode&lt;/p&gt;

&lt;p&gt;You should now be able to use the programmed key&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2010/10/11/using-the-key-magic-with-one-for-all-remote&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I recently purchased a One for All remote (URC-7940 in this case) to use with my DVD player. All was going well until I wanted to program individual keys to some functions that weren&#8217;t working.</p>

<p>The user manual that came with the remote boasted that it had a &#8220;Key Magic&#8221; function that allowed me to do just this! However it neglected to tell me how. After more searching than should have been required I finally found <a href="http://www.amazon.co.uk/gp/forum/cd/discussion.html/ref=cm_cd_et_md_pl?ie=UTF8&amp;cdForum=Fx1WX1FVWDH63CA&amp;cdMsgNo=32&amp;cdPage=2&amp;asin=B0027FFX4O&amp;store=electronics&amp;cdSort=oldest&amp;cdThread=Tx2WDHEL5BEMPSI&amp;cdMsgID=Mx3IDGGYU2DEH4K#Mx3IDGGYU2DEH4K">a post on a forum</a> that mentioned how to program a button. </p>

<p>To program a button you must first get a 5 digit function for the device you&#8217;re trying to program the remote for. These functions are called &#8220;EFCs&#8221; and you can usually find them using a search engine. For instance I found my device&#8217;s EFCs <a href="http://www.remotecentral.com/cgi-bin/mboard/whichremote/thread.cgi?1592">here</a>.</p>

<p>Anyway the procedure is as follows:</p>

<p> 1. Hold the &#8216;M&#8217; button (Key <strong>M</strong>agic) until the red light on the control blinks twice<br />
 2. On the remote press the buttons &#8220;994&Prime;. The red light should blink twice. <br />
 3. Press &#8216;M&#8217; again. The red light will blink once more. You are now in Key Magic mode<br />
 4. Enter your 5 digit code for the function.<br />
 5. Finally press the key you want to assign the function to. The red light will blink twice more to confirm you&#8217;re back in normal mode</p>

<p>You should now be able to use the programmed key</p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2010/10/11/using-the-key-magic-with-one-for-all-remote">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2010/10/11/using-the-key-magic-with-one-for-all-remote#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=76</wfw:commentRss>
		</item>
				<item>
			<title>Current time in milliseconds in QT</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2010/10/11/current-time-in-milliseconds-in-qt</link>
			<pubDate>Mon, 11 Oct 2010 17:27:57 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="alt">Computing</category>
<category domain="alt">Programming</category>
<category domain="main">Qt</category>			<guid isPermaLink="false">75@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;If you want to get the current time in QT including the milliseconds you can do so with QTime:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;QTime::currentTime().toString(&quot;ss.zzz&quot;);&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is very useful when debugging&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2010/10/11/current-time-in-milliseconds-in-qt&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>If you want to get the current time in QT including the milliseconds you can do so with QTime:</p>

<blockquote><p>QTime::currentTime().toString("ss.zzz");</p></blockquote>

<p>This is very useful when debugging</p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2010/10/11/current-time-in-milliseconds-in-qt">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2010/10/11/current-time-in-milliseconds-in-qt#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=75</wfw:commentRss>
		</item>
				<item>
			<title>HTC Sense adding all Facebook contacts to phone book On HTC Desire</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2010/06/23/htc-sense-adding-all-facebook-contacts-to-phone-book-on-htc-desire-1</link>
			<pubDate>Wed, 23 Jun 2010 17:26:20 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="alt">Mutimedia</category>
<category domain="main">Phones</category>			<guid isPermaLink="false">74@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;This week I got updated my phone to the HTC Desire. It&amp;#8217;s a great phone and I was happy when I discovered that I could link my contacts to their Facebook profile so that their photos and information will appear in my phone book. &lt;/p&gt;

&lt;p&gt;My happiness was short lived however as HTC Sense (the application responsible for linking my contacts to their Facebook accounts) had also added all of my &amp;#8220;friends&amp;#8221; who had listed their phone number on Facebook to my phone book. After some searching I discovered that lots of other people were also having the same problem and there was no fix. It was either no links at all or linking everyone on Facebook. &lt;/p&gt;

&lt;p&gt;However I have come across another application called SyncMyPix that can handle linking Facebook accounts to my phone book contacts without adding people to my phone book. It&amp;#8217;s available in the Market so it&amp;#8217;s easy to install and it&amp;#8217;s also free although there is an option to donate if you find the application useful.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2010/06/23/htc-sense-adding-all-facebook-contacts-to-phone-book-on-htc-desire-1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This week I got updated my phone to the HTC Desire. It&#8217;s a great phone and I was happy when I discovered that I could link my contacts to their Facebook profile so that their photos and information will appear in my phone book. </p>

<p>My happiness was short lived however as HTC Sense (the application responsible for linking my contacts to their Facebook accounts) had also added all of my &#8220;friends&#8221; who had listed their phone number on Facebook to my phone book. After some searching I discovered that lots of other people were also having the same problem and there was no fix. It was either no links at all or linking everyone on Facebook. </p>

<p>However I have come across another application called SyncMyPix that can handle linking Facebook accounts to my phone book contacts without adding people to my phone book. It&#8217;s available in the Market so it&#8217;s easy to install and it&#8217;s also free although there is an option to donate if you find the application useful.</p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2010/06/23/htc-sense-adding-all-facebook-contacts-to-phone-book-on-htc-desire-1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2010/06/23/htc-sense-adding-all-facebook-contacts-to-phone-book-on-htc-desire-1#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=74</wfw:commentRss>
		</item>
				<item>
			<title>Unlocking your Facebook account when it "forgets" your e-mail address</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2010/06/10/unlocking-your-facebook-account-when-it-forgets-your-e-mail-address</link>
			<pubDate>Thu, 10 Jun 2010 20:47:24 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="main">Computing</category>			<guid isPermaLink="false">72@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;My girlfriend lost access to her Facebook account this week and Facebook kept reporting that her e-mail address wasn&amp;#8217;t registered. Her profile was still active and looking on the Internet showed unfortunately this has happened to a number of people and any requests of help were ignored by Facebook.&lt;/p&gt;

&lt;p&gt;The exact message that Facebook was giving was:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Incorrect email address&lt;/p&gt;

&lt;p&gt;The email address you entered does not belong to any account. You may try clearing your browser&amp;#8217;s cache and cookies by following these instructions.&lt;/p&gt;

&lt;p&gt;You can log in using any email address, username or mobile phone number associated with your account. Make sure that it is typed correctly.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;A few people had reported finding a solution in using their username instead of their e-mail address when logging in. You have to set your username up manually and not everyone has done this, including my girlfriend, so this wasn&amp;#8217;t any help to us. The same goes for phone numbers.&lt;/p&gt;

&lt;p&gt;To solve this problem I decided to try to test all of her other e-mail addresses to see if one of those had been made her login e-mail address somehow. Lucky it had and we were back into her account. &lt;/p&gt;

&lt;p&gt;I don&amp;#8217;t know if this is a bug in Facebook or somehow she changed it without knowing but we now have the account back. One thing that may be the cause was that she no longer had access to the e-mail address in question so it&amp;#8217;s possible Facebook discovered this and in their wisdom deleted it from her account without saying&lt;/p&gt;

&lt;p&gt;If you do get back into your account then I suggest changing your password just on the off chance that a hacker got into the account to cause the original e-mail address to be lost.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2010/06/10/unlocking-your-facebook-account-when-it-forgets-your-e-mail-address&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>My girlfriend lost access to her Facebook account this week and Facebook kept reporting that her e-mail address wasn&#8217;t registered. Her profile was still active and looking on the Internet showed unfortunately this has happened to a number of people and any requests of help were ignored by Facebook.</p>

<p>The exact message that Facebook was giving was:</p>

<blockquote><p>Incorrect email address</p>

<p>The email address you entered does not belong to any account. You may try clearing your browser&#8217;s cache and cookies by following these instructions.</p>

<p>You can log in using any email address, username or mobile phone number associated with your account. Make sure that it is typed correctly.</p></blockquote>

<p>A few people had reported finding a solution in using their username instead of their e-mail address when logging in. You have to set your username up manually and not everyone has done this, including my girlfriend, so this wasn&#8217;t any help to us. The same goes for phone numbers.</p>

<p>To solve this problem I decided to try to test all of her other e-mail addresses to see if one of those had been made her login e-mail address somehow. Lucky it had and we were back into her account. </p>

<p>I don&#8217;t know if this is a bug in Facebook or somehow she changed it without knowing but we now have the account back. One thing that may be the cause was that she no longer had access to the e-mail address in question so it&#8217;s possible Facebook discovered this and in their wisdom deleted it from her account without saying</p>

<p>If you do get back into your account then I suggest changing your password just on the off chance that a hacker got into the account to cause the original e-mail address to be lost.</p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2010/06/10/unlocking-your-facebook-account-when-it-forgets-your-e-mail-address">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2010/06/10/unlocking-your-facebook-account-when-it-forgets-your-e-mail-address#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=72</wfw:commentRss>
		</item>
				<item>
			<title>Installing KDevelop in Kubuntu/Ubuntu 10.04</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2010/05/11/installing-kdevelop-in-kubuntu-ubuntu-10-04</link>
			<pubDate>Tue, 11 May 2010 18:03:17 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="alt">Computing</category>
<category domain="alt">Linux</category>
<category domain="alt">Ubuntu</category>
<category domain="main">Programming</category>
<category domain="alt">Kubuntu</category>			<guid isPermaLink="false">71@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;After upgrading to Kubuntu 10.04 I was disappointed to find that KDevelop wasn&amp;#8217;t listed in the default repositories as apparently it wasn&amp;#8217;t ready in time for the release of 10.04. From what I&amp;#8217;ve read there&amp;#8217;s not much chance of it being added to the repository anytime soon either so I decided to find another way to install it.&lt;/p&gt;

&lt;p&gt;Luckily installing it isn&amp;#8217;t too difficult (no need to install from source) as it is available from the &lt;a href=&quot;https://launchpad.net/~kubuntu-ppa/+archive/backports&quot;&gt;Kubuntu Backports PPA&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To add the PPA to your repository simply use the command:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;sudo add-apt-repository ppa:kubuntu-ppa/backports&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;You can now update your repository and install KDevelop as normal:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;sudo apt-get update&lt;br /&gt;
sudo apt-get install kdevelop&lt;/p&gt;&lt;/blockquote&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2010/05/11/installing-kdevelop-in-kubuntu-ubuntu-10-04&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>After upgrading to Kubuntu 10.04 I was disappointed to find that KDevelop wasn&#8217;t listed in the default repositories as apparently it wasn&#8217;t ready in time for the release of 10.04. From what I&#8217;ve read there&#8217;s not much chance of it being added to the repository anytime soon either so I decided to find another way to install it.</p>

<p>Luckily installing it isn&#8217;t too difficult (no need to install from source) as it is available from the <a href="https://launchpad.net/~kubuntu-ppa/+archive/backports">Kubuntu Backports PPA</a>.</p>

<p>To add the PPA to your repository simply use the command:</p>

<blockquote><p>sudo add-apt-repository ppa:kubuntu-ppa/backports</p></blockquote>

<p>You can now update your repository and install KDevelop as normal:</p>

<blockquote><p>sudo apt-get update<br />
sudo apt-get install kdevelop</p></blockquote><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2010/05/11/installing-kdevelop-in-kubuntu-ubuntu-10-04">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2010/05/11/installing-kdevelop-in-kubuntu-ubuntu-10-04#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=71</wfw:commentRss>
		</item>
				<item>
			<title>Resizing a QGraphicsPixmapItem</title>
			<link>http://www.ukdragon.com/blog/index.php/index/2010/01/19/resizing-a-qgraphicspixmapitem</link>
			<pubDate>Tue, 19 Jan 2010 16:35:46 +0000</pubDate>			<dc:creator>Kieren Searle</dc:creator>
			<category domain="alt">Computing</category>
<category domain="alt">Programming</category>
<category domain="alt">c++</category>
<category domain="main">Qt</category>			<guid isPermaLink="false">70@http://www.ukdragon.com/blog/</guid>
						<description>&lt;p&gt;I&amp;#8217;ve just finished fighting with some code where I wanted to resize some QGraphicsPixmapItems. I was able to scale them but this didn&amp;#8217;t allow me to resize to specific pixels. I decided to take a step back and noticed that if I create a pixmap object first I can resize that, then create a QGraphicsPixmapItem using the pixmap object:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;//first create a pixmap object&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;QPixmap pixmapObject(&quot;:Images/myimage.png&quot;);&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;//now create a QGraphicsPixmapItem&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;QGraphicsPixmapItem * myImagePixmapItem = new QGraphicsPixmapItem;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;//finally add the resize the pixmap and add it to the QGraphicsPixmapItem&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc8&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;myImagePixmapItem-&amp;gt;setPixmap(pixmapObject.scaledToHeight(50, Qt::SmoothTransformation));&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The scaledToHeight function in the last line could be either scaled, scaledToWidth or scaledToHeight. scaled allows you to set both the width and height of the object where as the other 2 will scale the other side automatically so that the aspect ratio of the pixmap is preserved.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.ukdragon.com/blog/index.php/index/2010/01/19/resizing-a-qgraphicspixmapitem&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished fighting with some code where I wanted to resize some QGraphicsPixmapItems. I was able to scale them but this didn&#8217;t allow me to resize to specific pixels. I decided to take a step back and noticed that if I create a pixmap object first I can resize that, then create a QGraphicsPixmapItem using the pixmap object:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">//first create a pixmap object</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">QPixmap pixmapObject(":Images/myimage.png");</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code><span class="amc_default">//now create a QGraphicsPixmapItem</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default">QGraphicsPixmapItem * myImagePixmapItem = new QGraphicsPixmapItem;</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"></div></td><td><code><span class="amc_default">//finally add the resize the pixmap and add it to the QGraphicsPixmapItem</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc8"></div></td><td><code><span class="amc_default">myImagePixmapItem-&gt;setPixmap(pixmapObject.scaledToHeight(50, Qt::SmoothTransformation));</span></code></td></tr>
</table></div>

<p>The scaledToHeight function in the last line could be either scaled, scaledToWidth or scaledToHeight. scaled allows you to set both the width and height of the object where as the other 2 will scale the other side automatically so that the aspect ratio of the pixmap is preserved.</p><div class="item_footer"><p><small><a href="http://www.ukdragon.com/blog/index.php/index/2010/01/19/resizing-a-qgraphicspixmapitem">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.ukdragon.com/blog/index.php/index/2010/01/19/resizing-a-qgraphicspixmapitem#comments</comments>
			<wfw:commentRss>http://www.ukdragon.com/blog/index.php/index/?tempskin=_rss2&#38;disp=comments&#38;p=70</wfw:commentRss>
		</item>
			</channel>
</rss>

