<?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>www.idevelopsoftware.com &#187; Qt</title>
	<atom:link href="http://www.idevelopsoftware.com/topic/blog/software/qt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.idevelopsoftware.com</link>
	<description>Homepage</description>
	<lastBuildDate>Thu, 19 Aug 2010 18:38:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Nokia places Qt under LGPL License &#8211; Sweet!</title>
		<link>http://www.idevelopsoftware.com/2009/01/nokia-places-qt-under-lgpl-license-sweet/</link>
		<comments>http://www.idevelopsoftware.com/2009/01/nokia-places-qt-under-lgpl-license-sweet/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 15:05:07 +0000</pubDate>
		<dc:creator>bsmith</dc:creator>
				<category><![CDATA[Advance of Technology]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[LinkedIn]]></category>

		<guid isPermaLink="false">http://blog.idevelopsoftware.com/?p=156</guid>
		<description><![CDATA[I have been a big fan of the Trolltech Qt Framework for a number of years. It is a fantastic way to build high quality cross-platform desktop applications in C++. For the past six years it seems like every project I work on has included a rich desktop GUI application of some sort. Each time [...]]]></description>
			<content:encoded><![CDATA[<p>I have been a big fan of the Trolltech Qt Framework for a number of years. It is a fantastic way to build high quality cross-platform desktop applications in C++. For the past six years it seems like every project I work on has included a rich desktop GUI application of some sort. Each time this need would arise I would start the process of <em>selling</em> the idea of using the Qt Framework for the project. The biggest hurdle was always the per-developer cost for the commercial license of the framework. I would hear things like</p>
<blockquote><p>
Just use MFC. It&#8217;s free and we don&#8217;t really see a need for the application to be cross-platform anyway.
</p></blockquote>
<p>or sometimes I would hear</p>
<blockquote><p>
Use the GPL version of Qt and just <em>keep it under the radar</em> until we are sure the application will be released to our customers.
</p></blockquote>
<p>It was always frustrating to try and make the case that Qt was a better solution than MFC for UI, was more comprehensive for general development than other frameworks, and that it was worth planning for the possiblity of releasing the applications for Linux or Mac as well as Windows. In the end each project did adopt the Qt Framework, but it really was a distraction to try and justify the use.</p>
<p>Thankfully with the purchase of Trolltech by Nokia we are seeing a change in the licensing terms for the Qt Framework. Starting with the 4.5 release it looks like the framework will be placed under the LGPL license making it much easier to adopt as part of commercial development efforts.</p>
<p>Here are a couple links that discuss the development further:</p>
<ul>
<li><a href="http://arstechnica.com/news.ars/post/20090114-nokia-qt-lgpl-switch-huge-win-for-cross-platform-development.html">ARS Technica</a></li>
<li><a href="http://www.pcworld.com/article/157054/nokia_hopes_to_increase_qt_popularity_with_new_license.html">PC World</a></li>
</ul>
<p>and you can read the news directly from Nokia on the <a href="http://www.qtsoftware.com/about/licensing">Qt Licensing Terms</a> page.</p>
<p>This new development on the licensing front and the recent inclusion of WebKit into the Qt Framework make me very optimistic about a long and prosperous future for developers who know the Qt Framework!  <b>Thank you Nokia!</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.idevelopsoftware.com/2009/01/nokia-places-qt-under-lgpl-license-sweet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use QImage to create a composite image (i.e. One image with another overlaid on top of it.)</title>
		<link>http://www.idevelopsoftware.com/2008/03/use-qimage-to-create-a-composite-image-ie-one-image-with-another-overlaid-on-top-of-it/</link>
		<comments>http://www.idevelopsoftware.com/2008/03/use-qimage-to-create-a-composite-image-ie-one-image-with-another-overlaid-on-top-of-it/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 22:19:01 +0000</pubDate>
		<dc:creator>bsmith</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://idvlpsw.wordpress.com/?p=33</guid>
		<description><![CDATA[Today I wanted to combine two images of similar size to create a new image. The new image was going to be used for a toolbar button. I have purchased a set of commercial images in the PNG format for use on application toolbars. The set came with a bunch of overlay images that could [...]]]></description>
			<content:encoded><![CDATA[<p>
<span class="alignright"><a target="_blank" href="http://www.trolltech.com"><img src="http://idvlpsw.files.wordpress.com/2008/03/qt.png" alt="qt.png" border="0" width="48" height="48" /></a></span>Today I wanted to combine two images of similar size to create a new image. The new image was going to be used for a toolbar button. I have purchased a set of commercial images in the PNG format for use on application toolbars. The set came with a bunch of overlay images that could be used to modify each of the base images.  The overlays included things like arrows, warning signs, arrows, people, etc.  My first though for using these images was to fire up Adobe Illustrator and just create a new icon by merging the base and overlay together.  Then I realized that Qt could do the job for me at runtime, and with a little work I could dynamically overlay different badges on a base icon.
</p>
<p>
The code below can be used to construct a composite image. You pass in references to a base image and an overlay image. These images are used to construct a third image, and that is returned to the caller.</p>
<pre>
QImage createImageWithOverlay(const QImage&amp; baseImage, const QImage&amp; overlayImage)
{
    QImage imageWithOverlay = QImage(baseImage.size(), QImage::Format_ARGB32_Premultiplied);
    QPainter painter(&amp;imageWithOverlay);

    painter.setCompositionMode(QPainter::CompositionMode_Source);
    painter.fillRect(imageWithOverlay.rect(), Qt::transparent);

    painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
    painter.drawImage(0, 0, baseImage);

    painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
    painter.drawImage(0, 0, overlayImage);

    painter.end();

    return imageWithOverlay;
}
</pre>
</p>
<p>
Here is an example of using this routine to create an image that might be used to represent something being transfered from a network attached machine.</p>
<pre>
    QImage baseImage(":/Resources/connect_pc_64.png");
    QImage overlayLogoff(":/Resources/overlay_arrow_east_64.png");
    QImage logoffImage = createImageWithOverlay(baseImage, overlayLogoff)
</pre>
<p>The two source images and resulting composite are shown below.</p>
<ol>
<li>:/Resources/connect_pc_64.png</li>
<p><img src="http://idvlpsw.files.wordpress.com/2008/03/connect-pc-64.png" border="0" width="64" height="64" /></p>
<li>:/Resources/overlay_arrow_east_64.png</li>
<p><img src="http://idvlpsw.files.wordpress.com/2008/03/arrow-east-64.png" border="0" width="64" height="64" /></p>
<li>Generated Composite Image</li>
<p><img src="http://idvlpsw.files.wordpress.com/2008/03/logoffimage.png" border="0" width="64" height="64" /></p>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.idevelopsoftware.com/2008/03/use-qimage-to-create-a-composite-image-ie-one-image-with-another-overlaid-on-top-of-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO &#8211; Use Visual Studio 2005 for Qt Open Source Development</title>
		<link>http://www.idevelopsoftware.com/2006/02/howto-use-visual-studio-2005-for-qt-open-source-development/</link>
		<comments>http://www.idevelopsoftware.com/2006/02/howto-use-visual-studio-2005-for-qt-open-source-development/#comments</comments>
		<pubDate>Wed, 15 Feb 2006 00:13:00 +0000</pubDate>
		<dc:creator>bsmith</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://idvlpsw.wordpress.com/?p=13</guid>
		<description><![CDATA[THIS IS A WORK IN PROGRESS. EXPECT UPDATES AND DON&#8217;T BE SURPRISED BY INCOMPLETE INFORMATION Trolltech has released Qt 4 under a dual-license for all supported platforms. In earlier versions of Qt they only released the open source version for Mac and Linux, leaving Windows developers with no choice but to purchase a commercial license. [...]]]></description>
			<content:encoded><![CDATA[<p><i>THIS IS A WORK IN PROGRESS. EXPECT UPDATES AND DON&#8217;T BE SURPRISED BY INCOMPLETE INFORMATION</i><span class="alignright"><a target="_blank" href="http://www.trolltech.com"><img src="http://idvlpsw.files.wordpress.com/2008/03/qt.png" alt="qtlogo_feature.png" border="0" /></a></span></p>
<p>Trolltech has released Qt 4 under a dual-license for all supported platforms. In earlier versions of Qt they only released the open source version for Mac and Linux, leaving Windows developers with no choice but to purchase a commercial license. That all changed with the release of Qt 4 when Trolltech started to provide an open source version for Windows development too! The only catch was that Trolltech only supports the MinGW GCC compiler for development using the open source version.</p>
<p>This article describes how to patch Qt 4 open source edition on Windows so you can develop using Visual Studio 2005. You can even develop using the free Express edition of Visual Studio 2005 so long as you also install the latest Platform SDK.</p>
<p>Please keep in mind that these patches and tips are not provided so you can get around the very generous Trolltech dual-license terms of use. If you are developing or intend to develop a commercial application using Qt 4 you must purchase a commercial license for Qt 4. Only use the information provided in this article if you wish to develop open source GPL software for the Windows platform and wish to use the Microsoft Visual C++ 2005 compiler instead of the MinGW GCC compiler.</p>
<h2>Download Qt 4.1 Source Code, Patches, and Notes</h2>
<ul>
<li>Download the latest open source Windows version of Qt 4.1 from Trolltech at http://www.trolltech.com/download/qt/windows.html.  Unzip the file to C:\. It will extract all of the files into a sub-directory called qt-win-opensource-src-4.1.0.</li>
<li>Download the latest patch file used to modify the open source version of Qt 4.1 to support Microsoft Visual Studio 2005 from Source Forge at http://sourceforge.net/projects/qtwin/. Unzip the file to C:\qt-win-opensource-src-4.1.0.</li>
<li>Download the build script, environment setup and notes from http://www.idevelopsoftware.com/downloads/qt/Qt41WinBuildScript.zip. Unzip the file to C:\qt-win-opensource-src-4.1.0.</li>
<li>If you don&#8217;t already have Visual Studio 2005 you can download the Express edition. You will also need to download the Platform SDK.
<p>http://msdn.microsoft.com/vstudio/express/visualC/default.aspx</p>
<p>http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx</p>
</li>
</ul>
<h2>Building Qt 4.1 using Visual C++ 2005</h2>
<p>Open C:\qt-win-opensource-src-4.1.0 in Windows Explorer.<br />
 Double-click on the &#8220;Qt 4.1 Command Prompt&#8221; shortcut to open a Command Prompt window with the environment setup for Qt 4.1 development. IMPORTANT: You must already have Visual Studio 2005 installed. You may need to edit setenv.cmd if your copy of Visual Studio 2005 is not in the default location.</p>
<p>Run &#8220;installpatch41.bat&#8221;<br />
 This will patch the Qt 4.1 source code so it builds properly using the Visual C++ 2005 compiler.</p>
<p>Run &#8220;build.cmd&#8221;<br />
 This will build all of the Qt 4.1 libraries, utilities, and sample applications using the Visual C++ 2005 compiler.</p>
<p>To rebuild, if necessary, make sure to first clean up the previous build. Do this by running<br />
nmake distclean</p>
<p>from the C:\qt-win-opensource-src-4.1.0 directory.</p>
<p>External Tools Configuration in Visual Studio 2005</p>
<p>Launch Visual Studio 2005 and select the &#8220;External Tools&#8230;&#8221; item from the Tools menu.<br />
Use the &#8220;Add button to define each of the following external tools:</p>
<p>Title &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. QMake (Project File Generation Mode)<br />
Command &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; D:\qt-win-opensource-src-4.1.0\bin\qmake.exe<br />
Arguments &#8230;&#8230;&#8230;&#8230;&#8230;. -project -spec win32-msvc2005<br />
Initial directory &#8230;&#8230;.. $(ProjectDir)<br />
Use Output window &#8230;&#8230;.. [X]<br />
Treat output as Unicode .. [ ]<br />
Prompt for arguments &#8230;.. [ ]<br />
Close on exit &#8230;&#8230;&#8230;&#8230; [X]</p>
<p>Title &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. QMake (Makefile Generation Mode)<br />
Command &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; D:\qt-win-opensource-src-4.1.0\bin\qmake.exe<br />
Arguments &#8230;&#8230;&#8230;&#8230;&#8230;. -makefile -spec win32-msvc2005<br />
Initial directory &#8230;&#8230;.. $(ProjectDir)<br />
Use Output window &#8230;&#8230;.. [X]<br />
Treat output as Unicode .. [ ]<br />
Prompt for arguments &#8230;.. [ ]<br />
Close on exit &#8230;&#8230;&#8230;&#8230; [X]</p>
<p>Title &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Qt Designer<br />
Command &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; D:\qt-win-opensource-src-4.1.0\bin\designer.exe<br />
Arguments &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Initial directory &#8230;&#8230;.. $(ProjectDir)<br />
Use Output window &#8230;&#8230;.. [ ]<br />
Treat output as Unicode .. [ ]<br />
Prompt for arguments &#8230;.. [ ]<br />
Close on exit &#8230;&#8230;&#8230;&#8230; [ ]</p>
<p>Title &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Qt Assistant<br />
Command &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; D:\qt-win-opensource-src-4.1.0\bin\assistant.exe<br />
Arguments &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Initial directory &#8230;&#8230;.. $(ProjectDir)<br />
Use Output window &#8230;&#8230;.. [ ]<br />
Treat output as Unicode .. [ ]<br />
Prompt for arguments &#8230;.. [ ]<br />
Close on exit &#8230;&#8230;&#8230;&#8230; [ ]<br />
Adding a Qt 4.1 Development Toolbar</p>
<p>Add a new toolbar for Qt 4.1 Development by selecting &#8220;Customize&#8230;&#8221; from the Tools menu. Once the &#8220;Customize&#8221; dialog appears select the &#8220;Toolbars&#8221; tab and press &#8220;New&#8230;&#8221; For the toolbar name enter &#8220;Qt 4.1 Development&#8221; and press &#8220;OK&#8221;.<br />
Select the &#8220;Commands&#8221; tab on the &#8220;Customize&#8221; dialog. Select &#8220;Tools&#8221; from the &#8220;Categories:&#8221; list. Scroll down in the &#8220;Commands:&#8221; list until you see &#8220;External Command 7&#8243;. Drag commands 7, 8, 9, and 10 onto the new &#8220;Qt 4.1 Development&#8221; toolbar.<br />
Creating a New Visual Studio 2005 Project</p>
<p>Open the &#8220;New Project&#8221; dialog by selecting File-&gt;New-&gt;Project&#8230; from the menu. Under &#8220;Project types&#8221; on the left side of the dialog expand &#8220;Visual C++&#8221; and then select &#8220;General.&#8221; The right side of the dialog will display a list of all the general project types. Select &#8220;Makefile Project&#8221; from the list of project types. Provide a name for the project and set the location on disk where you wish the project to be saved. Be sure not to check &#8220;Create directory for solution&#8221;, as this will create an extra level of directories that is just confusing. Click the &#8220;OK&#8221; button and you will be presented with the &#8220;Makefile Application Wizard.&#8221; Simply press the &#8220;Finish&#8221; button on the first page of the wizard.</p>
<p>Once the project has been created and opened, set the NMake Configuration Properties for the project as shown below. In the &#8220;Solution Explorer&#8221; right-click on the name of your project. Select &#8220;Properties&#8230;&#8221; from the context menu. On the property pages dialog select &#8220;Configuration Properties&#8221; and &#8220;NMake&#8221; on the left side tree control. On the right side, enter the following information, making sure to set the properties for both the debug and release configurations.</p>
<p>Release Configuration Settings</p>
<p>General<br />
&#8212;&#8212;-<br />
Build Command Line &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. nmake release-all<br />
Rebuild All Commaond Line &#8230;&#8230;&#8230;&#8230;&#8230; nmake release-clean release-all<br />
Clean Command Line &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. nmake release-clean<br />
Output &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. foo.exe</p>
<p>IntelliSense<br />
&#8212;&#8212;&#8212;&#8212;<br />
Common Language Runtime Support &#8230;&#8230;&#8230; No Common Language Runtime support<br />
Preprocessor Definitions &#8230;&#8230;&#8230;&#8230;&#8230;. WIN32;NDEBUG;UNICODE;QT_LARGEFILE_SUPPORT;QT_DLL;<br />
                                          QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT<br />
Include Search Path &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &#8220;c:/qt-win-opensource-src-4.1.0/include/QtCore&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/include/QtGui&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/include&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/include/ActiveQt&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/mkspecs/win32-msvc2005&#8243;<br />
Forced Includes &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Assembly Search Path &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
Forced Using Assemblies &#8230;&#8230;&#8230;&#8230;&#8230;..<br />
Debug Configuration Settings</p>
<p>General<br />
&#8212;&#8212;-<br />
Build Command Line &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. nmake debug-all<br />
Rebuild All Commaond Line &#8230;&#8230;&#8230;&#8230;&#8230; nmake debug-clean debug-all<br />
Clean Command Line &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. nmake debug-clean<br />
Output &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. food.exe</p>
<p>IntelliSense<br />
&#8212;&#8212;&#8212;&#8212;<br />
Common Language Runtime Support &#8230;&#8230;&#8230; No Common Language Runtime support<br />
Preprocessor Definitions &#8230;&#8230;&#8230;&#8230;&#8230;. WIN32;_DEBUG;UNICODE;QT_LARGEFILE_SUPPORT;QT_DLL;<br />
                                          QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT<br />
Include Search Path &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &#8220;c:/qt-win-opensource-src-4.1.0/include/QtCore&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/include/QtGui&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/include&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/include/ActiveQt&#8221;;<br />
                                          &#8220;c:/qt-win-opensource-src-4.1.0/mkspecs/win32-msvc2005&#8243;<br />
Forced Includes &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Assembly Search Path &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
Forced Using Assemblies &#8230;&#8230;&#8230;&#8230;&#8230;..<br />
QMake Project Settings</p>
<p>Create a project file called &#8220;foo.pro&#8221; in the directory for your makefile project. Replace the name &#8220;foo.pro&#8221; with the name of your actual application. Place the file in the directory where your Visual Studio project was created. To start with, the contents might look something like this:</p>
<p>CONFIG += qt<br />
TEMPLATE = app<br />
SOURCES += foo.cpp<br />
HEADERS += foo.h<br />
FORMS += foo.ui<br />
You should be off and running now. For more detailed information I would suggest reading the qmake reference manual. You might also want to take a look at the Qt 4.1 tutorials in Qt Assistant. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idevelopsoftware.com/2006/02/howto-use-visual-studio-2005-for-qt-open-source-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
