Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29068

The scroll bar in a QTableWidget is displayed as a block after calling verticalScrollBar()->hide();

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 4.8.3, 5.0.0, 5.0.1
    • Widgets: Itemviews
    • None
    • all platforms

    Description

      When we try to hide the vertical scroll bar of a QTableWidget, it continues to be displayed as a white bloc (filled with the widget background color).

      QTableWidget *t = new QTableWidget;
      setCentralWidget(t);

      t->setRowCount(50);
      t->setColumnCount(1);
      t->verticalHeader()->hide();
      t->setColumnWidth(0, t->width());

      for(int i=0;i<50;i++)
      {
      QTableWidgetItem *it = new QTableWidgetItem;
      it->setText(QString("%1").arg);
      t->setItem(i, 0, it);
      }

      t->verticalScrollBar()->hide();

      On the attached screenshot, you can see the scrollbar...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            sam_t Thibaut Samuël
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes