Say hello to QskTextEdit - #502
Conversation
differences text edit <-> text input
questions / discussion:
|
|
|
||
| auto options = skinnable->textOptionsHint( subControl, &status ); | ||
| if ( !status.isValid() ) | ||
| options.setElideMode( Qt::ElideRight ); |
There was a problem hiding this comment.
Does the elide mode make much sense here ? A text area is multi line and I would expect, that the placeholder text would be fitted into the viewport. ( -> QskTextOptions::Wrap )
There was a problem hiding this comment.
But wait - you are probably right. One also wouldn't expect to have to scroll the placeholder text.
There was a problem hiding this comment.
Yeah, especially since it is not possible to scroll the text (just like with QML's TextArea)
Resolves uwerat#109
d90f972 to
1af5648
Compare
|
Code is in master now - beside the design system specific skinlets ( do we have any specific decorations ? ). |
|
Don't believe, that we need an error state - at least suggest not to implement it for the first release. |
|
I also noticed, that the API of QQuickTextInput is not exported completely. But I thought I will have a second look at them once I'm done with QskTextField and friends. F.e I wouldn't add undo/redo to a password field and where to export the related API depends on the type of controls we will have ... |
|
It is very likely, that QskTextEdit will be laid out with one dimension being fixed, while the other one grows with the text. So QskTextEditSkinlet::sizeHint needs to support heightForWidth/widhForHeight calculations. The implementation will be similar to QskTextLabelSkinlet::sizeHint. |
|
I noticed, that it is not possible to enter newlines with the keyboard ? |
Yeah strange, looking at the code, QQuickTextEdit enables the Qt::ImhMultiLine flag, and QskTextEdit does check for it. I will look into it; worst case is we will have to override QQuickItem::inputMethodQuery() and return said flag. |
Isn't that similar to the ones from the text input? I.e. for M3 we would have the label text in the border or so, for which we would need an own skinlet? I couldn't even find a text edit for M3, but I assumed we would implement it in analogy to the text fields. |
We need something like #503 . It turns out inputMethodHints() is sort of a user setting; when querying the hints in inputMethodQuery(), QQuickTextEdit adds the Qt::ImMultiLine flag manually, see https://codebrowser.dev/qt6/qtdeclarative/src/quick/items/qquicktextedit.cpp.html#_ZNK21QQuickTextEditPrivate25effectiveInputMethodHintsEv . |






Resolves #109