@@ -198,6 +198,11 @@ void SplitInput::clearSelection()
|
||||
this->textInput.setTextCursor(c);
|
||||
}
|
||||
|
||||
QString SplitInput::getInputText() const
|
||||
{
|
||||
return this->textInput.toPlainText();
|
||||
}
|
||||
|
||||
void SplitInput::refreshTheme()
|
||||
{
|
||||
QPalette palette;
|
||||
@@ -213,6 +218,8 @@ void SplitInput::editTextChanged()
|
||||
{
|
||||
QString text = this->textInput.toPlainText();
|
||||
|
||||
this->textChanged.invoke(text);
|
||||
|
||||
text = text.trimmed();
|
||||
static QRegularExpression spaceRegex("\\s\\s+");
|
||||
text = text.replace(spaceRegex, " ");
|
||||
|
||||
Reference in New Issue
Block a user