Results 1 to 2 of 2

Thread: Considerations for a GUI with rich text?

  1. #1
    Join Date
    Jan 2010
    Location
    Perth, Australia
    Posts
    37
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Considerations for a GUI with rich text?

    Hi all,

    I'm making a to-do list desktop application. So far, I have a user-input class, model class, and hard disk IO class. I want to make my view class next, but am not sure what approach I should take.

    Eventually I'll have different views for the user to choose from, but for the first one I wanted to have:
    1. A simple list of (sortable) task names, without bullets
    2. The ability to have different font sizes and colours for different list entries
    3. The ability to select and copy the list text
    4. The ability to edit the task name (inline editor) when left-clicking on a list entry
    5. The ability to edit the task properties (popup dialog) when double-clicking on a list entry


    The options that I'm aware of are QPainter and QTextEdit. I have used basic aspects of QPainter before and haven't used QTextEdit before. From my quick research, QPainter doesn't let me implement (3) and QTextEdit doesn't let me implement (4), (5). Is this correct? Are there other existing classes that I should consider for my app view? Is there any other advice you'd give me?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Considerations for a GUI with rich text?

    If you have already a model, then use a QListView. With it you can realize all points. A little bit more complex but more flexible: You can use QGraphicsView and arrange all yourself.

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

    hackerNovitiate (4th April 2010)

Similar Threads

  1. How to use rich text in a QComboBox?
    By aarunt1 in forum Qt Programming
    Replies: 3
    Last Post: 19th March 2010, 20:20
  2. Rich text in QGraphicsTextItem
    By maverick_pol in forum Qt Programming
    Replies: 3
    Last Post: 29th September 2008, 20:08
  3. Rich text with QPainter?
    By sarefo in forum Qt Programming
    Replies: 3
    Last Post: 7th April 2008, 14:40
  4. QTextEdit + paste rich text as plain text only
    By Yong in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2008, 16:45
  5. Rich Text Format
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 4th October 2006, 10:53

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.