Results 1 to 3 of 3

Thread: Qt Designer and \n

  1. #1
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    99
    Thanks
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt Designer and \n

    This is probably a really easy question, but i'm having some difficulty anyway. A program i am working on in Designer has a QPushButton that should have multi-lined text. I can programmatically set the text to "abc\ndef" and get the desired result. When i try to set the text in the designer however, UIC escapes the \ so i get the following text: "abc\\ndef". How can i force the designer to either let me insert multi-lined text to begin with or not escape the \ ?

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt Designer and \n

    Try updating to Qt 4.3. It works for me with Qt 4.3.2 (but not with Qt 4.2.3).
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    TheRonin (8th November 2007)

  4. #3
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    99
    Thanks
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and \n

    Quote Originally Posted by jpn View Post
    Try updating to Qt 4.3. It works for me with Qt 4.3.2 (but not with Qt 4.2.3).
    I'll try that, thanks!

Similar Threads

  1. Replies: 1
    Last Post: 22nd January 2007, 12:13
  2. centralWidget and QDockWidgets in designer
    By momesana in forum Qt Tools
    Replies: 1
    Last Post: 18th December 2006, 11:56
  3. Replies: 13
    Last Post: 15th December 2006, 11:52
  4. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  5. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28

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
  •  
Qt is a trademark of The Qt Company.