F
F
freshstyler2016-02-25 00:19:59
Qt
freshstyler, 2016-02-25 00:19:59

Multiline text in Qt?

I am creating a base in C ++ using Qt, I ran into a problem - a single-line text is kept in QString, but there is no special multi-line class, and there are no skills to add a splitter like \n to the text itself. The program is a base that will be stored in the table on the left, and now I need the chord text to be stored in the song class variable. (Subsequently, there will be work with files). And here is the question, or rather a request: what class variable to create in order to store multiline text in it, and if it is a QString, then how to introduce a splitter there to break the line? Kdba1XefG_g.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2016-02-25
@unitby

So what exactly did QString not fit? Isn't it possible to store a multiline there?
As a last resort, use QStringList

H
hydra_13, 2016-03-13
@hydra_13

i would use qstring and \n.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question