Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableView change cell font
Qt 6.11 is out! See what's new in the release blog

QTableView change cell font

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 4 Posters 6.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tikani
    wrote on last edited by
    #1

    Hi!
    How to change QTableView's cells' font? I want to set Times New Roman.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      huse
      wrote on last edited by huse
      #2

      You can change the cell font with:
      tableViewObj->setFont(QFont("Times",20));

      1 Reply Last reply
      4
      • D Offline
        D Offline
        DrumM8
        wrote on last edited by
        #3

        What about changing only 1 property of the font? Then you need getFont() which does not exist :-(

        mrjjM 1 Reply Last reply
        0
        • D DrumM8

          What about changing only 1 property of the font? Then you need getFont() which does not exist :-(

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @DrumM8
          Hi
          in Qt the get methods do not start with get.
          so its simply
          font()

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved