Results 1 to 13 of 13

Thread: Suggestions for particular text format in QTextEdit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Suggestions for particular text format in QTextEdit

    This would suggest you are dealing with a list of blocks which would suggest QListView or QListWidget to be an ideal solution to your problem. Of course you have to provide a custom delegate for selecting text (unless you're not interested in selecting part of a single block but rather whole block at a time).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2

    Default Re: Suggestions for particular text format in QTextEdit

    Unfortunately I don't think QListView is a good solution mainly because not all the big words will have the same width size. Using the ListView control I have a grid with all the columns sized as the largest width element in the list that is not what I would. Just for a moment forget the presence of the "small words below the big words". In this case this will be a normal editor with standard text written using big font (like this text I'm writing). In add of this standard text every big words will have a small word below. An example could be a text written in a foreign language and below every words the meaning of the word in your language written smaller...

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Suggestions for particular text format in QTextEdit

    Quote Originally Posted by Suppaman View Post
    Unfortunately I don't think QListView is a good solution mainly because not all the big words will have the same width size.
    That is not important. Enable wrapping property and have the list flow from left to right.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4

    Default Re: Suggestions for particular text format in QTextEdit

    I'll try to follow this way too, but before I would to verify if really tables can not be aligned into the same line in QTextEdit. Someone can confirm? In add I still have the problem above using QTextTable. After inserted new table using insertTable() the cursor remain inside the first cell, how can I move the cursor outside the table just created?

    Thank you for the help

  5. #5

    Default Re: Suggestions for particular text format in QTextEdit

    Hi

    If someone is interested I found the solution. Basically I created tables with css style "float:left" that is supported by QTextEdit control. This will result to show tables in the same line and move on the next line if the edit control is resized, exactly what I need. Thank you to all for the support.

Similar Threads

  1. QTextEdit format html code
    By Edder in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2012, 15:03
  2. can't get format under cursor of a QTextEdit
    By dvirtz in forum Qt Programming
    Replies: 4
    Last Post: 1st November 2011, 12:12
  3. Problem with Qtextedit format - hex viewing
    By daro21 in forum Qt Programming
    Replies: 1
    Last Post: 6th June 2011, 19:18
  4. Support for .rtf format in QTextDocument or QTextEdit?
    By LynneV in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2010, 23:01
  5. QTextEdit current cursor text format
    By afail in forum Qt Programming
    Replies: 0
    Last Post: 13th April 2009, 14:24

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.