Colored dots when using a text element in Qt5

I wrote this sample code:

import QtQuick 2.0 Rectangle { width: 360 height: 360 Text { text: qsTr("Hello World") anchors.centerIn: parent font.pixelSize: 55 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } 

Performing this, I see the text along with colored dots surrounding the text:

enter image description here

Platform: Windows 7: Qt 5.0.1

Q. Can someone point out what could be a possible problem?

PS: This is not a problem with my monitor, it works fine on the same machine with ubuntu as the OS.

+4
source share
1 answer

You are using Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB) . Part of OpenGL means that for this build of Qt, working OpenGL drivers are required. Some Windows installations have broken OpenGL support. You need to either make sure that the system has the latest drivers installed from your graphics card vendor, or you should not use this version of Qt. This is probably the source of your problem.

You need to download, for example, Qt 5.1.1 for Windows 32-bit (VS 2010, 505 MB) . In the version without the word OpenGL , it uses ANGLE. ANGLE is an implementation of OpenGL ES 2 on top of DirectX 9. When you use it, you will no longer depend on the working OpenGL drivers.

There is no ANGLE support in MinGW yet. You can use Visual Studio Express for your compiler, it works great. You will only use the build tools through Qt Creator, not the IDE, so the fact that Express does not limit you. You will need to download and install the appropriate Platform SDK fragment to get debugging tools.

+2
source

Source: https://habr.com/ru/post/1499796/


All Articles