Ref T369, fixed findChildren by adding Q_OBJECT macro

https://swift-project.slack.com/archives/G7GD2UP9C/p1537898045000100
This commit is contained in:
Klaus Basan
2018-09-25 21:11:34 +02:00
parent df3fb1f1a8
commit b9ae33d126
3 changed files with 11 additions and 16 deletions

View File

@@ -236,12 +236,10 @@ namespace BlackGui
const QString style = this->getStyleSheet();
for (CTextMessageTextEdit *textEdit : textEdits)
{
if (textEdit->hasTextDocument())
{
textEdit->setStyleSheetForContent(style);
}
textEdit->setStyleSheetForContent(style);
}
ui->comp_SettingsStyle->setStyle(this->getStyleSheet());
this->update(); // refresh window
}
void CTextMessageComponent::onStyleSheetChanged()
@@ -335,6 +333,7 @@ namespace BlackGui
QPushButton *closeButton = new QPushButton("Close", newTab);
QVBoxLayout *layout = new QVBoxLayout(newTab);
CTextMessageTextEdit *textEdit = new CTextMessageTextEdit(newTab);
textEdit->setObjectName("tep_" + tabName);
int marginLeft, marginRight, marginTop, marginBottom;
ui->tb_TextMessagesAll->layout()->getContentsMargins(&marginLeft, &marginTop, &marginRight, &marginBottom);
newTab->layout()->setContentsMargins(marginLeft, marginTop, marginRight, 2);