Qt World Summit: Submit your Presentation

[Moved] not able to see text on TextInput element of QML

  • I have created qml/test.qml file as:
    import QtQuick 1.0
    id: pahe
    width: 200; height: 50
    color: "#55aaee"
    id: editor
    left: parent.left; right: parent.right; leftMargin: 10; rightMargin: 10
    verticalCenter: parent.verticalCenter
    cursorVisible: true;
    font.bold: true
    color: "#151515";
    selectionColor: "Green"
    focus: true
    and One qml/main.cpp file as:
    #include <QApplication>
    #include <QtDeclarative>
    #include <QDeclarativeView>

    int main(int argc, char *argv[])
    QApplication app(argc, argv);

    QDeclarativeView view;
    return app.exec(&#41;;

    I am using qt-everywhere-opensource-src-4.7.2.tar.gz for qt source.
    I have configure and compileQT using command
    ./configure -webkit -no-openssl -script -scripttools -declarative -prefix /usr/local/Trolltech/Qt-4.7.2
    make install
    I am compiling this main.cpp file using commands like:
    #qmake -project

    and I am running the exe as:

    So problem is that I am not able to see cursor any text on TextInput element even after entering text using key board.
    If I print the TextInput.text of element it shows entered text on console log but can not see on screen. What could be the reason?
    I have tried different combination of font color and back grounds also but not useful.
    If i run same test.qml file using qmlviewer it works fine able to see text.
    Any hint or comment in this would be helpful.


    Moved to Quick forum due to none-India specific content & language, more chance of a good answer here; Andre

  • I had a similar problem with a TextField: It didn't get shown.
    I could solve it by defining its size:
    @width: parent.width
    height: 50@

    Maybe that helps you as well?

  • In this case Defining size is not solving the problem :(

Log in to reply