<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>esdrasbeleza.com &#187; Qt Creator</title>
	<atom:link href="http://www.esdrasbeleza.com/tag/qt-creator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.esdrasbeleza.com</link>
	<description>Só mais um blog do WordPress</description>
	<lastBuildDate>Fri, 13 Jan 2012 14:14:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VolumeSlider&#8217;s tooltip misbehaviour</title>
		<link>http://www.esdrasbeleza.com/2010/06/29/volumesliders-tooltip-misbehaviour/</link>
		<comments>http://www.esdrasbeleza.com/2010/06/29/volumesliders-tooltip-misbehaviour/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 17:58:20 +0000</pubDate>
		<dc:creator>Esdras Beleza</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Qt Creator]]></category>

		<guid isPermaLink="false">http://www.esdrasbeleza.com/?p=203</guid>
		<description><![CDATA[I was developing a Qt application that makes use of a Phonon::VolumeSlider object. But after clicking the mute button beside of the VolumeSlider and verifying its tooltip, I noticed it was showing the wrong volume. A video can explain this better than me: www.youtube.com/watch?v=rJcqZ2SVTK0 If you want to reproduce this problem, you can download its source [...]]]></description>
			<content:encoded><![CDATA[<p>I was developing a Qt application that makes use of a Phonon::VolumeSlider object. But after clicking the mute button beside of the VolumeSlider and verifying its tooltip, I noticed it was showing the wrong volume. A video can explain this better than me:</p>
<p style="text-align: center;"><span class="youtube">
<object type="application/x-shockwave-flash" width="320" height="265" data="http://www.youtube.com/v/rJcqZ2SVTK0?color1=3a3a3a&amp;color2=999999&amp;border=0&amp;fs=1&amp;hl=en&amp;modestbranding=1&amp;loop=&amp;showinfo=0&amp;showsearch=0&amp;rel=1">
<param name="movie" value="http://www.youtube.com/v/rJcqZ2SVTK0?color1=3a3a3a&amp;color2=999999&amp;border=0&amp;fs=1&amp;hl=en&amp;modestbranding=1&amp;loop=&amp;showinfo=0&amp;showsearch=0&amp;rel=1" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=rJcqZ2SVTK0">www.youtube.com/watch?v=rJcqZ2SVTK0</a></p></p>
<p>If you want to reproduce this problem, you can download its <a href="http://www.esdrasbeleza.com/wp-content/uploads/2010/06/VolumeSlider.tar.gz">source code</a> as a Qt Creator project. Please keep in mind that it&#8217;s the source code with errors!  But there&#8217;s a workaround to this problem:</p>
<p>1. In the class where you create the Phonon::AudioOutput whose volume is handled by the VolumeSlider, put this:</p>
<pre class="brush: cpp; title: ; notranslate">
connect(audioOutput, SIGNAL(mutedChanged(bool)), this, SLOT(handleMute(bool)));
connect(audioOutput, SIGNAL(volumeChanged(qreal)), this, SLOT(handleVolume(qreal)));
</pre>
<p>2. Create the slots you used above using the following code:</p>
<pre class="brush: cpp; title: ; notranslate">
void MainWindow::handleMute(bool mute) {
    if (!mute) {
        audioOutput-&gt;setVolume(outputVolume);
    }
}
void MainWindow::handleVolume(qreal volume) {
    outputVolume = volume;
}
</pre>
<p>3. Declare the slots and the outputVolume variable in your header file:</p>
<pre class="brush: cpp; title: ; notranslate">
private:
    qreal outputVolume;

private slots:
    void handleMute(bool mute);
    void handleVolume(qreal volume);
</pre>
<p>You can download the <a href="http://www.esdrasbeleza.com/wp-content/uploads/2010/06/VolumeSliderFixed.tar.gz">fixed source code</a>. I don&#8217;t know if this behaviour is the expected in Qt, but <a href="http://bugreports.qt.nokia.com/browse/QTBUG-11782">I filed a bug for it</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.esdrasbeleza.com/2010/06/29/volumesliders-tooltip-misbehaviour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix ugly fonts in Qt-based applications</title>
		<link>http://www.esdrasbeleza.com/2010/05/20/how-to-fix-ugly-fonts-in-qt-based-applications/</link>
		<comments>http://www.esdrasbeleza.com/2010/05/20/how-to-fix-ugly-fonts-in-qt-based-applications/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:30:48 +0000</pubDate>
		<dc:creator>Esdras Beleza</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Qt Creator]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://www.esdrasbeleza.com/?p=153</guid>
		<description><![CDATA[I was using Qt Creator and tried to change the editor&#8217;s font to Monaco, 9. But hey, Monaco is not that ugly: So I googled a way to fix for this problem, and found the fix at Arch Linux forums. You&#8217;ll need to create a file called .fonts.conf in your home directory with this content: I [...]]]></description>
			<content:encoded><![CDATA[<p>I was using Qt Creator and tried to change the editor&#8217;s font to <a href="http://en.wikipedia.org/wiki/Monaco_(typeface)">Monaco, 9</a>. But hey, Monaco is not that ugly:</p>
<p><img class="aligncenter size-full wp-image-154" title="Monaco before fix" src="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/monaco-qt-before.png" alt="Monaco before fix" width="150" height="150" /></p>
<p>So I googled a way to fix for this problem, and found the fix at <a href="http://bbs.archlinux.org/viewtopic.php?pid=705548#p705548">Arch Linux forums</a>. You&#8217;ll need to create a file called <em>.fonts.conf</em> in your home directory with this content:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
&lt;fontconfig&gt;
   &lt;match target=&quot;font&quot; &gt;
      &lt;edit mode=&quot;assign&quot; name=&quot;rgba&quot; &gt;
         &lt;const&gt;rgb&lt;/const&gt;
      &lt;/edit&gt;
   &lt;/match&gt;
   &lt;match target=&quot;font&quot; &gt;
      &lt;edit mode=&quot;assign&quot; name=&quot;hinting&quot; &gt;
         &lt;bool&gt;true&lt;/bool&gt;
      &lt;/edit&gt;
   &lt;/match&gt;
   &lt;match target=&quot;font&quot; &gt;
      &lt;edit mode=&quot;assign&quot; name=&quot;hintstyle&quot; &gt;
         &lt;const&gt;hintslight&lt;/const&gt;
      &lt;/edit&gt;
   &lt;/match&gt;
   &lt;match target=&quot;font&quot; &gt;
      &lt;edit mode=&quot;assign&quot; name=&quot;antialias&quot; &gt;
         &lt;bool&gt;true&lt;/bool&gt;
      &lt;/edit&gt;
   &lt;/match&gt;
&lt;/fontconfig&gt;
</pre>
<p>I closed Qt Creator and reopened it. The result was this:</p>
<p><img class="aligncenter size-full wp-image-156" title="Monaco after fix" src="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/monaco-qt-after.png" alt="Monaco after fix" width="150" height="150" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.esdrasbeleza.com/2010/05/20/how-to-fix-ugly-fonts-in-qt-based-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I chose Qt</title>
		<link>http://www.esdrasbeleza.com/2010/05/13/why-i-chose-qt/</link>
		<comments>http://www.esdrasbeleza.com/2010/05/13/why-i-chose-qt/#comments</comments>
		<pubDate>Thu, 13 May 2010 14:14:39 +0000</pubDate>
		<dc:creator>Esdras Beleza</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[GTK]]></category>
		<category><![CDATA[gtkmm]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Qt Creator]]></category>

		<guid isPermaLink="false">http://www.esdrasbeleza.com/?p=137</guid>
		<description><![CDATA[A few months ago, I planned to learn some graphic toolkit. As a GNOME user, GTK was my natural choice. Although I&#8217;m a Python lover, I chose C++ because I just wanted to learn a new language and stop being afraid of pointers. So I started to read the gtkmm documentation, like tutorials and API, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">A few months ago, I planned to learn some graphic toolkit. As a GNOME user, GTK was my natural choice. Although I&#8217;m a Python lover, I chose C++ because I just wanted to learn a new language and stop being afraid of pointers. So I started to read the <a href="http://www.gtkmm.org/">gtkmm</a> documentation, like tutorials and API, and to program a simple music player. I was learning gtkmm and it all seemed okay.</p>
<p style="text-align: center;"><img class="aligncenter" title="Qt" src="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/qt.png" alt="" width="200" height="238" /></p>
<p style="text-align: justify;">But I read a little about Qt and, after talking with some friends about the pros and cons of GTK and Qt, I decided to do with Qt the same things that I&#8217;ve already done with GTK up to that point. So I would know <strong>what choice was better for me</strong>. Notice that I&#8217;m not saying that Qt is better for everybody and that GTK must die, but that Qt looked better <strong>for me and my personal project</strong>. After this disclaimer, and can tell my reasons:</p>
<ul style="text-align: justify;">
<li><strong>Look &amp; feel.</strong> I&#8217;m a look&amp;feel fanatic, and sometimes I move from GNOME to KDE only to check its new features. But I hate how GTK applications look in KDE. You can use <a href="http://code.google.com/p/gtk-qt-engine/">gtk-qt-engine</a>, but you&#8217;ll still notice the differences. You can set GTK to use the excellent <a href="http://kde-look.org/content/show.php/QtCurve+(KDE4,+KDE3,+%26+Gtk2+Theme)?content=40492">QtCurve</a> theme, that have identical versions to Qt and GTK, but you&#8217;ll get tied to a theme. But look what you have if you run a Qt application in GNOME (<a href="http://projects.gnome.org/gedit/">gedit</a> is a GTK-based application and <a href="http://musicbrainz.org/doc/PicardTagger">Picard</a> is a Qt-based application):<br />
<a href="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/gtk_qt_look_and_feel.png"><img class="aligncenter" style="margin-top: 15px; margin-bottom: 15px;" title="GTK vs QT look &amp; feel in GNOME" src="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/gtk_qt_look_and_feel-300x231.png" alt="" width="300" height="231" /></a><br />
Thanks to <a href="http://labs.trolltech.com/blogs/2008/05/13/introducing-qgtkstyle/">QGtkStyle</a>, Qt applications detect if you are in GNOME and your Qt application gets an almost perfect GTK look &amp; feel. And yeah, it includes open and save dialogs.</li>
<li><strong>Documentation. </strong>Qt has a very, very rich and well-organised documentation, with <a href="http://doc.qt.nokia.com/4.6/tutorials.html">tutorials</a>, <a href="http://doc.qt.nokia.com/4.6/index.html">API references</a>, and <a href="http://doc.qt.nokia.com/4.6/examples.html">examples</a>. gtkmm also have all these items, but they didn&#8217;t look very friendly to me. And the documentation of Qt 4.7, still in development, <a href="http://doc.qt.nokia.com/4.7-snapshot/">will be even better</a>.</li>
<li><strong>A simple, but good IDE.</strong> A good programmer must not be dependent on IDEs, but they really help you. I tried to use Anjuta (unstable sometimes), MonoDevelop (very good for .NET platform, but not a good IDE for C/C++ development) and Netbeans as IDE when I was using gtkmm, and I was not satisfied with them. But Qt has its official IDE, <strong>Qt Creator</strong>:<br />
<a href="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/qtcreator.png"><img class="aligncenter size-medium wp-image-139" style="margin-top: 15px; margin-bottom: 15px;" title="Qt Creator" src="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/qtcreator-300x177.png" alt="" width="300" height="177" /></a><br />
Qt Creator is clean, simple, and complete. It has quick access to documentation, breakpoints, project configuration, native support for CVS, Subversion and Git, good code completion, a good GUI designer (like the GTK&#8217;s <a href="http://glade.gnome.org/">Glade</a>), among other features.</li>
<li><strong>Runs well on many platforms.</strong> Qt is smart enough to run well &#8211; and with native look &amp; feel, I really like this &#8211; in Linux, Mac, Windows, and others.</li>
</ul>
<p style="text-align: justify;">But Qt still has some cons:</p>
<ul>
<li>Users should have it installed to run Qt applications, and this is not very usual in Linux environments based on GNOME, neither on Windows systems.</li>
<li>Qt is free only if you&#8217;re using it in a free project. For commercial applications, <a href="http://qt.nokia.com/products/licensing">you must obtain a commercial Qt licence</a>. <strong>Update: </strong>this is not exactly a con. You still can use Qt under LGPL in commercial applications, but if you make any change to Qt you must publish them or purchase a commercial Qt licence <em>(thanks, krok, for the comment)</em>.</li>
</ul>
<p style="text-align: justify;">If you&#8217;re beginning to learn to program for graphical environments or you&#8217;re looking for a good graphical library to use in your project, you really should give Qt a try, implement some examples and feel which option is better for you.</p>
<p style="text-align: justify;"><a href="http://www.esdrasbeleza.com/wp-content/uploads/2010/05/gtk_qt_look_and_feel.png"><br />
</a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://www.esdrasbeleza.com/2010/05/13/why-i-chose-qt/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.353 seconds -->

