Menu
InformatiWeb
  • Index
  • Courses
  • Tutorials
  • InformatiWeb Pro

Login

Registration Password lost ?
FR
  • IT
    • Articles
    • Backup
    • BIOS
    • Live CD
    • MultiBoot
    • Security
    • Virtualization
    • Web
    • Windows
  • InformatiWeb
  • Tutorials
  • IT
  • Windows
  • Install and configure Qt Creator to develop with QT4
  • Windows
  • 30 August 2016 at 12:30 UTC
  • Lionel
  • 1/2

Install and configure Qt Creator to develop with QT4

Foreword : QT is a framework used by C++ developers who originally was free, open-source and developed by Nokia.
Currently, this framework was acquired by Digia and since this acquisition, 2 versions are now available: an open-source version and a commercial version.
That means it is possible that you will find links to different domains (qt.nokia.com and qt-project.org), but the new official website is qt.io and the open-source version is always available on the page "Download Qt Open Source" their site.

Note that QT SDK is the former name of the program that allowed you to install everything and Digia now provided QT Creator (the integrated development program : IDE) and QT OpenSource (source code / libraries).

Currently, when you download and install QT 5.x.x, everything is installed and configured automatically.
However, if you want to develop with QT 4, you must install these two packages separately and configure them to be able to compile, debug, ... with QT Creator.

  1. Why develop with QT 4 while QT 5 is available ?
  2. Configuration used
  3. Install the compiler : mingw32
  4. Install Qt OpenSource 4.8.6
  5. Install Qt Creator 3.6.1
  6. Configure Qt Creator to be able to compile and debug with Qt Creator 3.6.1
    1. Add the debugger : GNU gdb
    2. Add the compiler : MinGW
    3. Selecting the version of Qt to use for your programs : Qt 4.8.6
    4. Add and configure a kit
  7. Test the configuration

1. Why develop with QT 4 while QT 5 is available ?

Especially in order to develop its own stable web browser.
Indeed, if you want to develop a web browser using the QT framework, there are two possibilities :

  1. use QtWebKit which is part of QT4
  2. use Qt WebEngine which is his replacement since QT 5

Nevertheless, after several unsuccessful attempts to run a web browser (using the examples provided with QT 5) which was based on Qt WebEngine, we finally decided to install Qt4 in order to start developing our own web browser for personal use.
Among the stability problems that we had with these examples, there was this black window problem that occurred constantly and has also been found by other users.

With QtWebKit available in version QT4, we were able to add some of the features we wanted.
But finally, this personal web browser has not emerged because we have solve our problem by creating a Firefox extension instead of creating a full web browser for our personal use.
Nevertheless, QtWebKit is very convenient and can be used without problems to create your own web browser.

If you are interested by the creation of a Firefox extension :
- Look to the add-on SDK (Jetpack) which is a stable API and fully supported by most versions of Firefox. (This is the recommended choice by Mozilla and the one we chose)
- or WebExtensions : which is the API of the future to create Firefox extensions. Nevertheless, it is experimental. This means that your extension may stop working happen overnight.

Finally, note that the XUL (whose Mozilla speaks in his article "Construire une extension". English version of this article no longer exist) is deprecated and will end up to disappear. So, don't use this possibility.

Source : wiki.mozilla.org

2. Configuration used

In this tutorial, we will use and install :

  • Qt OpenSource 4.8.6 (32 bits / x86) for Windows which allows to use the mingw32 compiler v4.8.2. So, your program will use dll of QT4.
  • Qt Creator 3.6.1 x86 for Windows which allows to create programs in QT.
  • Packages redistribuables Visual C++ for Visual Studio 2013 (vcredist_x86.exe) : required to install Qt Creator 3.6.1 x86.
  • mingw32 i686-4.8.2 v3 rev3 which is the compiler that we can use to compile our program based on the dll and sources of Qt OpenSource 4.8.6.
  • gdb 7.7.0 32 bit (included in mingw32) which is the debugger that will be used through Qt Creator.

Note that these versions have not been randomly selected.
Indeed :
- Qt OpenSource 4.8.6 is the latest version of the existing source code and dll of QT4
- Qt Creator 3.6.1 is compatible with Qt OpenSource 4.8.6
- dll 2013 of Microsoft those that Digia or Nokia used to compile the installer of Qt Creator 3.6.1
- mingw32 i686-4.8.2 v3 rev3 : is the exact version of the mingw32 compiler that Qt OpenSource 4.8.6 will ask you when trying to install it.
- gdb 7.7.0 32 bits is the debugger present in the mingw32... file you have downloaded.

3. Install the compiler : mingw32

To install mingw32, it's very simple.
Just unzip the downloaded file using WinRAR (paid) or 7-Zip (free) to obtain this structure : mingw32\bin\...

4. Install Qt OpenSource 4.8.6

Launch the "qt-opensource-windows-x86-mingw482-4.8.6-1.exe" file and click Next.

As previously reported, Qt OpenSource 4.8.6 asks you where you unzipped files of mingw32 i686-4.8.2 v3 rev3.
In our case : C:\mingw32

Qt OpenSource installs the dll and sources of Qt 4.8.6, including sources of webkit (as you can see on the picture).

Uncheck the boxes and click Finish.

5. Install Qt Creator 3.6.1

To install Qt Creator 3.6.1, you must first install "Visual C++ Redistributable Packages for Visual Studio 2013".
It takes less than a minute.

Then, run the file "qt-creator-opensource-windows-x86-3.6.1.exe" to install Qt Creator 3.6.1.

The installation begins.

Check the "Launch Qt Creator" box and click Finish.

Next page

Share this tutorial

Partager
Tweet

To see also

  • Windows 10 - Disable distribution of updates on the local network

    Windows 1/20/2025

    Windows 10 - Disable distribution of updates on the local network

  • Windows 11 - Translate Windows using language packs (MUI)

    Windows 7/24/2023

    Windows 11 - Translate Windows using language packs (MUI)

  • Windows 8 / 8.1 - Recover the start menu

    Windows 5/26/2021

    Windows 8 / 8.1 - Recover the start menu

  • Windows 8 / 8.1 - Translate Windows using language packs (MUI)

    Windows 9/28/2021

    Windows 8 / 8.1 - Translate Windows using language packs (MUI)

Comments

You must be logged in to post a comment

Share your opinion

Pinned content

  • Useful softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

InformatiWeb Pro

  • Win. Server administration
  • Linux Administration
  • Virtualization

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.