Results 1 to 2 of 2

Thread: Multi line display

  1. #1
    Join Date
    May 2009
    Location
    Brazil
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Multi line display

    Hi there,

    I have an application which displays images from a camera and text. For that I am using the item-view architecture, I mean, I have a QGraphicsItem for the image and a QGraphicsTextItem for the text. Everything works nice, as long as I have just one line of text. When I try to display more than one line, it displays all the string in the same line (I use "\n" in the string of text, but it doesn´t work).
    How can I configure my text item in order to display multi line text on the screen?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Multi line display

    I think you need to use html, but the documentation is not very clear.

    For example: yourTextItem.setHtml("line 1<br/>line2");

Similar Threads

  1. Replies: 1
    Last Post: 21st November 2009, 09:29
  2. Combo with multi-line underlying list?
    By Avrohom in forum Qt Programming
    Replies: 3
    Last Post: 28th August 2009, 01:32
  3. Display a QWidget using multi-screen
    By tarod in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 15:02
  4. Multi-line elided text?
    By WinchellChung in forum Newbie
    Replies: 1
    Last Post: 6th February 2008, 17:37
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 14:49

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.