Hi,
i am using multi-line QTextEdit as logging-window
-> all user inputs should be logged and displayed in this scrollable box.
Basicly that works as supposed in my testing-application.
Each time i need to add a new text i am using something like that
myQTextEdit->append("the new inputline which should be added to the log");
myQTextEdit->append("the new inputline which should be added to the log");
To copy to clipboard, switch view to plain text mode
Today i had the idea to add a timestamp for each new entry.
I guess basicly i need QTime so i tried that:
myQTextEdit
->append
(QTime::currentTime().
toString());
myQTextEdit->append(QTime::currentTime().toString());
To copy to clipboard, switch view to plain text mode
Well that gives a new line with a timestamp...nice but not as need it.
I need a way to add a single line with the generated TimestampString and my custom defined string like in the first code-block.
Question 1:
Should i concat those strings somehow ?
Question 2:
Is the basic idea regarding my Timeconversion to String a good idea, or should i try it somehow diffrent ?
Best regards in advance
ape
Bookmarks