Topic: Text automatic line wrap ?

Now I am writing descriptions, bunches of text, on Qet drawings.
It there a way to make the text line wrap automatically?

I want the textblock to have a certain width, and wrap the lines automatically.

Re: Text automatic line wrap ?

Maybe i can edit the text in source mode.

Maybe use a "table" of one cell?
Ore some other trick...
I am not used to HTML, but surely can read up on it if that is a solution.

But how is actual total width defined?
How big is a "px" or whatever measure is suitable

Post's attachments

Screenshot_20161014_152153.png, 54.17 kb, 399 x 384
Screenshot_20161014_152153.png 54.17 kb, 413 downloads since 2016-10-14 

Re: Text automatic line wrap ?

You could see this little example in video for drag and drop html content in text editor : like table , etc

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Text automatic line wrap ?

Great, thanks nomicons/smile
Iĺl start there.
Seems i need to browse through your videos better.

Re: Text automatic line wrap ?

Hm, i still have not found a way to make text autowrapping in qet, but I am no HTML wiz.

I can make a one cell table with long text that wrap when i open it in web browser, but it do not wrap in QET, it just expands... even out of folio...

How do i tell it a max width?

6 (edited by Nuri 2016-10-20 09:57:07)

Re: Text automatic line wrap ?

@ Morganol:
I played with some css attributes in the "source" tab of the widget "Edit text" but it seems that Qt overwrite some values or do not accept all css attributes:
I tried the following:

<div style="max-width:20px;">
<p>your text here</p>
</div>

--> do nothing! Qt delete the <div> tag.

then I tried:

<ul style="max-width:20px;">
<li>your text here</li>
<li>your text here</li>
<li>your text here</li>
</ul>

--> do nothing! Qt delete the "max-width" attribute.

For your information:
the distance between 2 dots of the grid in the diagram editor is 10px.

Re: Text automatic line wrap ?

Thank you Nuri for investigation and knowing the scale 1 grid dot = 5px
I made a feature request https://qelectrotech.org/bugtracker/view.php?id=109

8 (edited by Nuri 2016-10-20 10:43:25)

Re: Text automatic line wrap ?

knowing the scale 1 grid dot = 5px

missunderstanding, I mean it like this:

Post's attachments

nuri-square_10x10px.png, 9.76 kb, 506 x 352
nuri-square_10x10px.png 9.76 kb, 347 downloads since 2016-10-20 

Re: Text automatic line wrap ?

Sorry you wrote that very clear indeed in the first place.nomicons/angel
I must get some coffee before engineering something today...!  nomicons/dizzy

Re: Text automatic line wrap ?

example :

<OL>
<LI>Terme A
 <OL>Sous-liste
 <LI>Terme A-1
 <LI>Terme A-2
 </OL>
<LI>Terme B
<LI>Terme C
</OL>

https://download.qelectrotech.org/qet/forum_img/html_text1.png
https://download.qelectrotech.org/qet/forum_img/html_text.png

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Text automatic line wrap ?

With automatic line wrap i mean a long text without linebreaks is dynamically broken into several lines depending on available width.

Example, if the above sentence is put into a cell with limited width:

With automatic line wrap i
mean a long text without
linebreaks is dynamically
broken into several lines
depending on available width.

That would make it take less work to dump informative texts onto drawings with less manual work to manually break them.