Results 1 to 1 of 1

Thread: QTextLayout, QTextLine::setNumColumns - strange behaviour

  1. #1
    Join Date
    Mar 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QTextLayout, QTextLine::setNumColumns - strange behaviour

    I want to layout the string:
    "\ttext line 1\n\ttext line 2"
    I replace '\n' with spaces and break line in these places manually.
    1) In the first pass setNumColumns(13) is called. The line should be "\ttext line 1 ".
    But after calling createLine() the textStart() returns 11(!), and '1' goes to the next line.
    2) For string
    "text line 1\n\ttext line 2"
    (without first '\t') setNumColumns(12) leads to textStart() = 13, and the leading tab on the second line is disappeared.

    I don't understand the logic
    Last edited by Dp0H; 1st March 2012 at 08:51.

Similar Threads

  1. Need help: Strange behaviour
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2008, 05:03
  2. Strange behaviour of QPainter...
    By oscar in forum Qt Programming
    Replies: 2
    Last Post: 8th November 2008, 13:07
  3. Very strange (perhaps) QHttp behaviour.
    By Kumosan in forum Qt Programming
    Replies: 5
    Last Post: 11th June 2008, 08:03
  4. Strange Painter behaviour
    By cwomeijer in forum Qt Programming
    Replies: 2
    Last Post: 4th September 2006, 21:52
  5. very strange behaviour
    By regix in forum Qt Programming
    Replies: 23
    Last Post: 20th July 2006, 18:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.