Como resolver este problema do Qt(Problema com o IDE)?
-
Fiz um teste ao criar uma aplicacao qml. Mas esta nao abre, onde e o conteudo criado em qml nao mostra nada como segue a imagem:
http://pt-br.tinypic.com/view.php?pic=1to1sx&s=5#.UqYEI_RDsy4Nao existe erro no codigo:
import QtQuick 2.0
Rectangle {
width: 360
height: 360
Text {
anchors.centerIn: parent
text: "Hello World"
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}isso e normal? Como resolvo?
-
Você está testando no Android (emulator), ou Desktop?
-
Rodando em Desktop...
Ja agradeço pelo resposta
-
Estranho.
O print que você enviou não tem nada. Nem o IDE (QtCreator) aberto.
-
Sim, se observar ele tem a janela aberta, mas fica todo transparente.
No caso estava executando como programa final(.exe)....Fiz isso para ver se conseguia algum resultado
Mas o mesmo acontece com Qt Creator aberto, nada funciona...
-
Aparece alguma coisa no "Application Output" do QtCreator?
Qual versão do Qt você está usando?
-
Sim, varios erros de linkagem...
Starting C:\Qt\Qt5.1.1\5.1.1\msvc2010\bin\qmlscene.exe C:/Qt/Qt5.1.1/Tools/QtCreator/bin/untitled/untitled.qml
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(void): Could not initialize egl display: error 12289QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( pixelSize ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( pixelSize ): shader program is not linked
QOpenGLFunctions created with non-current context
QSGMaterialShader: Shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked -
O Qt usa OpenGL. Se você instalou o pacote do Qt para OpenGl, é provavel que o seu problema seja esse. Tente instalar a versão com o Angle (que é uma biblioteca de converte as chamadas do OpenGl para o DirectX 9)
Dê uma olhada sobre o assunto "aqui":http://qt-project.org/wiki/Qt-5-on-Windows-ANGLE-and-OpenGL
-
Agradeço pelas respostas, vlw mesmo...
No caso eu nao instalei a versao com opengl, mas li o link que me passou. Vou fazer os teste e dou resposta sobre os resultados.
Existe alguma coisa aqui para avaliar sua ajuda? Como possitiva, dar pontos sei la....
agradeco muito
-
Hehe. Não precisa. Curto muito o Qt. E acho que, como eu encontro ajuda e respostas, não custa ajudar também.