Vuo
2.0.2
editor
VuoLineEdit.cc
Go to the documentation of this file.
1
10
#include "
VuoLineEdit.hh
"
11
15
VuoLineEdit::VuoLineEdit
(QWidget *parent) :
16
QLineEdit(parent)
17
{
18
updatePlaceholderTextStyle();
19
connect(
this
, &QLineEdit::textChanged,
this
, &VuoLineEdit::updatePlaceholderTextStyle);
20
}
21
26
void
VuoLineEdit::updatePlaceholderTextStyle()
27
{
28
// Placeholder text
29
if
(text().isEmpty())
30
setStyleSheet(
"color: #808080;"
);
// #c0c0c0 after 50% opacity reduction
31
32
// Normal text
33
else
34
setStyleSheet(
"color: black;"
);
35
}
36
37
VuoLineEdit::~VuoLineEdit()
38
{
39
}
Generated on Thu Mar 19 2020 23:15:58 for Vuo by
1.8.17