Appearance difference between Qt4 and Qt5 - qt

I use Ubuntu 12.10 64 bit. I installed Qt4 from Ubuntu repo.
Version is Qt 4.8.3 and Qt Creator 2.5.2
I also downloaded Qt5 from qt-project.org and its version number is
Qt 5.0.1 and Qt Creator 2.6.2
When I compiled and run same project, their appearance slightly different.
What is the reason for that? Is it because of Ubuntu or Qt5?

Qt5 brought in some major changes of the GUI code, if you spot differences it's likely to be down to that rather than anything else.
New graphics architecture. Qt 5 introduces a new graphics architecture for Qt Quick using Scenegraph on top of OpenGL. OpenGL (ES) 2.0 is mandated for this to work. The new architecture makes it easier to integrate OpenGL-based content, such as shader effects, with Qt Quick-based applications. The QWidget-based stack continues to work as in Qt 4.x (based on QPainter), but supported back-ends have been limited to SW rasterization, pixmaps, and images, an OpenGL backend for GL surface,s and a backend for PDF generation and printing. X11 and CoreGraphics are no longer supported.
From Dr Dobbs Qt5 beta tour.

Related

Self-contained toolchain for Qt for x86 Linux/Windows

I am setting up a Qt project which will be cross-copiled for a given display (running on ARM/Linux). The display will come with a self-contained cross-build toolchain which comprises Qt libraries with a specific Qt version (probably 5.15).
Now I would like to use a specific "static" toolchain incl. Qt libraries to also generate x86-builds of this Qt project (for testing, simulation; building/running on Linux and maybe also on Windows).
I'd avoid using the GCC and Qt development files introduced by the Linux package manager (e.g. apt), because the are not tied to a specific Qt version, i.e. upgrading the OS would always come with the risk to introduce build problems or break compatibility completely.
Are there good-practice approaches to achieve this?
So far I see three options:
Use a docker image
Possible problems:
Finding a image with the correct Qt version
building the Qt application would then work, but to execute it, the compatible Qt LGPL shared libs need to be available to the Qt application binary
Use a x86 -> x86 "standalone" toolchain
Find some standalone x86-toolchain analog to those (x86 -> x86), but additionaly...
it would either have to come with the Qt development files in the correct version
or we would have to build the Qt sources with this toolchain, and then extend the toolchain with the Qt built artifacts
Would be the preferred solution (and currently seems to be the most feasible of the approaches I can think of).
Virtual machine
Possible problems:
Finding a OS version with the correct Qt version
Select a OS version that contains the correct Qt version via package manager.
Not very elegant.
Qt online installer
only provides a limited choice of Qt versions (as of today: 5.15.2, 6.2.4, 6.3.2, 6.4.0) which is probably subject to change in the future

How to install QT on Ubuntu for Cross compiling

I know there are tons of informations out there on the web about my question.
I have searched and tried for at least 2 days to get my setup up and running. But there are many unclear points and i would be very happy if someone could help me with answering my questions.
My situation:
I have an i.MX6 Eval Board on my desk which is running uboot with Linux Kernel 4.9.2. There is no distro on top. Just the kernel with busybox.
Attached to the board is a LCD TFT which is accesed through the Framebuffer. There is no GPU in the Processor.
To compile uboot and the kernel, i use the linaro toolchain gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf This toolchain is located at /opt/toolchain. The compilation of the kernel and uboot works without any problems.
Now i would like to start the application development with QT Creator. I have therefore read a lot of topics on various forums and sites on the web. Unfortunately i did not get it working.
First of all i have a confusion about the meaning of the title: http://doc.qt.io/qt-4.8/qt-embedded-install.html
There is a guide how to install "Installing Qt for Embedded Linux" Does this mean that this version is for an embedded linux, so it means that it has to be installed on the embedded device. Or does it mean that it guides you how to install QT to develop for a target system and install QT on an other system?
Before i wrote this question, i have already installed QT5.7 from their website. After some googling, i figured out that there are some changes in the windowsystem between 4.8 and 5.x. Since i dont have any GPU and therefore i dont have any OpenGL support, im not sure whether i should better go with 4.8 or whether i could use the 5.x version. Usually i tend to use the latest versions if possible.
Next i saw, that i have to define the sysroot directory. In the sysroot directory there have to be the compiled libs for qt for the arm architecture. Is there a precompiled version of these libs or do i have to compile them by my self? If yes, where to start?
EDIT:
In some tutorials they use the angstrom toolchain with a "qte" suffix My linaro toolchain does not have such an suffix. Is it also possible to use my linaro toolchain to build the qt applications?
Maybe you will notice that im new to QT and to the Embedded Linux world.
Anyhow i hope there are people out there who will be happy to share their knowledge about this topic with me.
Thanks.

OpenGL program does not compile with QT 5.0

I followed this turial to create a very simple openGL program with QT.
I have QT 5.0. I created a new empty QT project, created all files as in the tutorial but the compilation failed. The cause is that certain methods like glShadeModel() are not recognized.
I tried include GL/glu.h (which include glShadeModel for instance) but this time there is a conflict with several openGL types. But according to the tutorial all opengl methods should be included in QtOpenGL. Maybe I have a too much recent version of QT. I'm lost.
Does anyone can help me ?
Qt5 is based on OpenGL ES 2.0, and this is a subset of desktop OpenGL, even some Qt tutorials are not adapted to this change yet. You will have to build Qt 5.0 with normal OpenGL if you wish to compile those tutorials.
i may only give you some points to check.
in .pro
*QT += opengl
*check your GPU for supporting the opengl version you are using, for example my laptop is only compatible with 2.1 opengl.
also please use "Qt" instead "QT", QT stands for quicktime by Apple.

Is Qt Creator built with Qt Creator?

Questions:
Is Qt Creator built with Qt Creator?
Similarly, is Qt Designer built with Qt Designer?
BTW, why are there two Qt IDEs? Are they competitors? Which one should I use? I am using Creator.
What is Qt SDK? I am asking this because the Qt Designer & Creator 2.2.1 and Qtmake 4.7.4 that I installed thro ubuntu 11.10 s/w centre does not work. The build menu is all greyed out.
When I downloaded the latest QtSDK (2.3.1/4.7.4) into a separate installation into /opt/QtSDK, both the ubuntu sanctioned installation and the /opt/QtSDK would work as expected.
Why did my ubuntu sanctioned installation not work without the SDK? What does the SDK do?
This one is for Ubuntu enthusiasts - Qt IDE requires the SDK to work, and yet ubuntu released both Creator/Designer without checking if they work first? There is no QtSDK installation item in s/w centre. Is that intentional, or a procedural bug?
After I build my desktop app (I am building a tabbed file explorer) on Linux, what steps do I need to make to have it running on Windows 7/Vista? Will I rebuild on a windows version of Qt Creator?
I also notice that Qt Creator code generation is not perfect. It would forget to include some Qt library files in the auto-generated code, and I had to correct that manually.
Is Qt Creator built with Qt Creator?
I believe so.
That doesn't mean that everyone who works on Qt has to use it - just that I believe that lots of people do.
I don't work for any of the companies that have produced Qt, but my reasoning is:
A Google search for "dogfooding qt creator" brings up plenty of hits, including this comment from November 2010:
We’re also “dogfooding” by releasing complex apps like Qt Creator and the Ovi Suite on the desktop ports of Qt
They've put a massive amount of effort into Qt Creator over the last few years. It's hard to imagine that being worthwhile, unless they used it themselves
At recent Qt Developer Days, Qt Developers have spoken really enthusiastically about Qt Creator
Similarly, is Qt Designer built with Qt Designer?
Yes. A look at the Qt Designer source code shows plenty of .ui (Designer) files.
Why are there two Qt IDEs? Are they competitors? Which one should I use? I am using Creator.
When you edit .ui files insiide Qt Creator, you are still running Qt Designer: it's simply showing the Designer window inside Creator, for convenience.
What is Qt SDK? ... What does the SDK do?
Qt SDK is just a convenient way to download all the Qt tools in one go. You don't have to use it.
This one is for Ubuntu enthusiasts ... Is that intentional, or a procedural bug?
Sorry - no idea. It's hard to imagine it being intentional though.
After I build my desktop app (I am building a tabbed file explorer) on Linux, what steps do I need to make to have it running on Windows 7/Vista? Will I rebuild on a windows version of Qt Creator?
You will need to install Qt on a Windows PC, and then build your source code in it.
You can either do that by using Qt Creator and the Windows compiler it includes (mingw) or you can use another compiler, if you have one, e.g. Visual Studio.
I also notice that Qt Creator code generation is not perfect. It would forget to include some Qt library files in the auto-generated code, and I had to correct that manually.
If you've used any non-Qt classes in arguments to signals and slots, then this answer may help you there.

How to start Symbian development with Qt?

I am an experienced Qt developer,
I just got Nokia 5233 mobile, I want to develop some Just For Fun applications on top of it.
Can you please tell me what are the prerequisite softwares/libraries I need install on my phone and computer ( Windows 7 32 bit )?
Install the Nokia Qt SDK 1.0.2 and you will get Qt 4.6.3 and Qt Mobility 1.0.2 together with all the tools you need for building Qt apps for Symbian. Also included Qt 4.7.0 as supported by Nokia's N900 device.
If you need a newer version of Qt (4.7.2, including QML) or Qt Mobility (1.1.1) then install the Qt SDK 1.1 (currently in beta).
Once the SDK installed, you will find the needed installation packages (*.sis files) for your Symbian^1 device, so that you can install the Qt framework components on your device. Also install the TRK component, for on device debugging.
If you need more help, see the answered questions at http://discussion.forum.nokia.com/forum/forumdisplay.php?219-Qt
See the Recommended SDK(s) on http://www.forum.nokia.com/Devices/Device_specifications/5233/
Also see
http://www.forum.nokia.com/Develop/Qt/

Resources