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. Set text-alignment for QTableWidget und QTableView column in stylesheet

Set text-alignment for QTableWidget und QTableView column in stylesheet

Scheduled Pinned Locked Moved General and Desktop
stylesheetqtablewidgetqtableviewtext-alignment
2 Posts 2 Posters 5.0k Views 2 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.
  • jensen82J Offline
    jensen82J Offline
    jensen82
    wrote on last edited by
    #1

    Hi!

    Ist it possible to set the text-alignment for QTableView/QTableWidget columns in a Qt Stylesheet? Can't find it in the Manuals.

    Thank you!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      If I read
      http://doc.qt.io/qt-4.8/stylesheet-reference.html#list-of-properties

      It says that
      text-align
      only supported for QPushButton and QProgressBar.

      Cannot find any sign that it has changed for 5.5

      So its via Delegate or the model.

      https://forum.qt.io/topic/11625/solved-text-alignment-in-qtableview-cell/4

      1 Reply Last reply
      0

      • Login

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