T
T
Tesla4o2018-08-17 08:41:41
Qt
Tesla4o, 2018-08-17 08:41:41

Text is not displayed in QPlainTextEdit, what's the problem?

Wrote a function that takes a string. After concatenation, it should be displayed with the date in the QPlainTextEdit. put cout, the variable is not empty. what is needed is displayed. But Plynedith doesn't have anything.
Here is the function:

void *WSystemMessage::log(QString strg) {
    QDateTime *t = new QDateTime();
    QString str = t->currentDateTime().toString("dd.MM.yyyy hh:mm:ss") + " : ";
    str = str + strg;
    cout << str.toStdString() << endl;
    this->findChild<QPlainTextEdit*>("WSystemMessage_plainTextEdit")
            ->appendPlainText(str);
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question