Bug in QTextEdit ?
Hi all,
I have this situations:
(1)
- te_anteprima->setText(file_personalizzato_str);
- te_anteprima->show();
(2)
- te_anteprima->show();
The QString file_personalizzato_str has some line that terminate with a new_line ( \n ) like this:
- [Generale]
- interfaccia_grafica=0
- connessione_a_star=%connessione_a_star%
- indirizzo_star=%indirizzo_star%
- utente_star=%utente_star%
- password_star=%password_star%
- ...
- ...
In the first case I see in the QTextEdit all the text with the right new line in the right place.
In the second case I see this:
- [Generale] interfaccia_grafica=0 connessione_a_star=%connessione_a_star% indirizzo_star=%indirizzo_star% utente_star=%utente_star% password_star=%password_star%
without new lines.
4 replies
That is nice. And the problem is…?
Edit: indeed, it is all in the docs.
setText will try to guess if the contents are HTML or plain text. In this case, it guesses plain text (no HTML tags, so it is right about that). So, no bug in QTextEdit, the issue is with your documentation reading skills.
BTW: it is a bit rude to claim you’ve found a bug [catb.org], if you’re not really sure.
You must log in to post a reply. Not a member yet? Register here!




