Results 1 to 3 of 3

Thread: Text under icon on QtableView

  1. #1
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Text under icon on QtableView

    hi, i need to show text under icons on a QTableView, i've tryed with Qt::AlignHCenter, etc... but doesnt work.
    I'm trying to do a Icon View list with a QTableView, something like this:

    iconview.png

    there is any way to do it?
    thanks.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Text under icon on QtableView

    A custom delegate. The standard delegate draws the Qt::DecorationRole icon to the left of the text.


    Also look at QListView in Qt::IconMode

  3. #3
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Text under icon on QtableView

    Thanks a lot!!
    QlistView and IconView Mode was all i need

Similar Threads

  1. Creating a list with icon and text in the center of icon
    By prophet0 in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2011, 03:03
  2. [QPushButton] text below icon
    By Tomasz in forum Newbie
    Replies: 10
    Last Post: 3rd December 2010, 15:06
  3. Button icon and text
    By electronicboy in forum Qt Programming
    Replies: 5
    Last Post: 9th October 2009, 22:27
  4. Text under the Icon
    By QiT in forum Newbie
    Replies: 3
    Last Post: 1st April 2007, 17:42
  5. Icon Text Alignment
    By nupul in forum Newbie
    Replies: 3
    Last Post: 1st May 2006, 04:47

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.