4
votes

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();
        }
    }
}

On executing this, I see text along with some colored dots surrounding the text :

enter image description here

Platform : Windows 7 : Qt 5.0.1

Q. Can someone point out what might be the possible problem ?

P.S. : This isnt a problem with my monitor, it works fine on the same machine with ubuntu as the OS.

1
Did you try another font for your text element? Like could it be the font not handling propertly such a large fontSize ? Could you try with a more recent version of Qt too to see if it changes anythingkoopajah
@koopajah Problem persists for different font size / font types. It works perfectly fine if I use Qt 4.7 on the same platform.Amit Tomar
@KubaOber ahh ok, thanks. Will give that a try. Just on last doubt. Now if I send this Application along with the necessary DLLs as a standalone package to someone else, do they need to have proper OpenGl drivers installed as well ? I am asking because this will bring a kind of dependency if someone would like to use the App I have developed in the sense that they need to have OpenGl installed.Amit Tomar

1 Answers

2
votes

You're using Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB). The OpenGL part means that this build of Qt requires working OpenGL drivers. Some Windows installations have broken OpenGL support. You need to either ensure that the system has most recent drivers installed from the graphics card vendor, or you should not use that version of Qt. That's likely the source of your issue.

You need to download, for example, Qt 5.1.1 for Windows 32-bit (VS 2010, 505 MB). The version without the word OpenGL in it uses ANGLE. ANGLE is an implementation of OpenGL ES 2 on top of DirectX 9. When you use it, you won't be dependent on working OpenGL drivers anymore.

There's no ANGLE support under MinGW yet. You can use the Visual Studio Express for your compiler, it works fine. You'll only be using the build tools via Qt Creator, not the IDE, so the fact that it's Express doesn't limit you. You'll need to download and install the relevant chunk of Platform SDK to get the debugging tools.