mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added possibility to set placeholder for text input
This commit is contained in:
parent
4284d3094a
commit
75fd8c666e
1 changed files with 4 additions and 0 deletions
|
|
@ -906,6 +906,7 @@ class TextWidget(QtWidgets.QWidget, InputObject):
|
|||
self.initial_attributes(input_data, parent, as_widget)
|
||||
|
||||
self.multiline = input_data.get("multiline", False)
|
||||
placeholder = input_data.get("placeholder")
|
||||
|
||||
layout = QtWidgets.QHBoxLayout(self)
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
|
@ -916,6 +917,9 @@ class TextWidget(QtWidgets.QWidget, InputObject):
|
|||
else:
|
||||
self.text_input = QtWidgets.QLineEdit(self)
|
||||
|
||||
if placeholder:
|
||||
self.text_input.setPlaceholderText(placeholder)
|
||||
|
||||
self.setFocusProxy(self.text_input)
|
||||
|
||||
layout_kwargs = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue