Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to hide QTableWidget border
Qt 6.11 is out! See what's new in the release blog

How to hide QTableWidget border

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 3 Posters 12.6k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi
    i would like to hide the border (the outer window , not the individual cells) in QTableWidgets.

    @
    Widget::Widget(QWidget *parent)
    : QWidget(parent)
    {
    setStyleSheet("QTableWidget {background-color: transparent;}");
    QTableWidget *table = new QTableWidget(this);
    table->setRowCount(3);
    table->setColumnCount(3);

    table->verticalHeader()->setVisible(false);
    table->horizontalHeader()->setVisible(false);
    table->verticalScrollBar()->setVisible(false);
    table->horizontalScrollBar()->setVisible(false);
    

    }
    @

    with the code above i can see 3X3 table but around the table there is one more box, looks like the border, i would like to hide it.

    please help..

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      I haven't tried it, but can you use the stylesheet to set it's border width to zero?
      @
      border: 0px;
      @

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qxoz
        wrote on last edited by
        #3

        Try:
        @table->setFrameStyle(QFrame::NoFrame);@

        1 Reply Last reply
        1

        • Login

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