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. how to set the stylesheet for a individual cell of QtableWindget
Forum Updated to NodeBB v4.3 + New Features

how to set the stylesheet for a individual cell of QtableWindget

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 338 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    QTableWidget * t = new QTableWidget;
    t->setColumnCount(5);
    t->setRowCount(3);
    QStringList headerLabels;

    QString col1 = "No of Patterns";
    QString col2 = "Set";
    QString col3 = "Type";
    QString col4 = " Pattern rules : pattern_1 : pattern_2 ";
    QString col5 = "Options";
    headerLabels << col1 << col2 << col3 << col4 << col5;
    t->setHorizontalHeaderLabels(headerLabels);

    how to set stylesheet for

    Row (0,0 ) with back0_1544783736213_cell.PNG

    raven-worxR 1 Reply Last reply
    0
    • Q Qt Enthusiast

      QTableWidget * t = new QTableWidget;
      t->setColumnCount(5);
      t->setRowCount(3);
      QStringList headerLabels;

      QString col1 = "No of Patterns";
      QString col2 = "Set";
      QString col3 = "Type";
      QString col4 = " Pattern rules : pattern_1 : pattern_2 ";
      QString col5 = "Options";
      headerLabels << col1 << col2 << col3 << col4 << col5;
      t->setHorizontalHeaderLabels(headerLabels);

      how to set stylesheet for

      Row (0,0 ) with back0_1544783736213_cell.PNG

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @Qt-Enthusiast
      this question has been asked hundreds of times already.
      Short answer you can't. There are workarounds though -> see the forum search

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3

        thanks , did not search that

        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