how can you use a placeholder for a TextInput or a tooltip in qml?
You can use the "QtQuick Controls module":http://qt-project.org/doc/qt-5/qtquickcontrols-index.html and use a TextField instead of a plain TextInput. The TextField has a property for placeholder text.
I am not sure what you mean on doing it for the tooltip, though.
it qml TextField is not recognized, don't know why.
all I got starting with text is Text, TextInput and TextEdit.
thanks for the hint :)
Ah, I think my sleep-adled brain didn't understand what you meant - I thought you meant placeholder text in a tooltip.
I edited my previous post to correct the link (I am, obviously, new here, though not new to Qt), which should be able to provide you detailed help, but I can give a quick overview.
At the top of whatever qml file you need this functionality in, add: "import QtQuick.Controls 1.1"
Then you should be able to use TextField, which includes placeholder text as a property. I am still not sure how to do a tooltip on such items.
even with the import of qtquick 1.1, it does not show me the TextField element :(
Hi, it's QtQuick.Controls 1.1, not QtQuick 1.1.
Also, this page might be useful: http://qt-project.org/doc/qt-5/qml-qtquick-controls-textfield.html