Questions tagged [qtableview]

QTableView is a Qt class providing a default model/view implementation of a table view.

A QTableView implements a table view that displays items from a model. This class is used to provide standard tables that were previously provided by the QTable class, but using the more flexible approach provided by Qt's model/view architecture.

QTableView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

1244 questions
0
votes
1 answer

How to set QTableView as a cell of QTableView

I have QTableView - mainTableView, in some cells of which I need to show another QTableView - cellTableView. Actually I found 2 ways: 1) Use pTableView->setIndexWidget 2) Use pTableView->openPersistentEditor and implement an ItemDelegate. I have…
Funt
  • 399
  • 8
  • 23
0
votes
0 answers

QT: Qtableview wrapping text

I am working with QtableView of Qt. I am facing one problem. I am not able to fix the content in to complete cell . In my case i have fix size of column and rows can be stretched. following is sample code #include…
vinay patel
  • 177
  • 3
  • 5
  • 10
0
votes
0 answers

How to select a row in a continuously updating table?

guys.I'm working on a GUI for controlling some robots. There is a table which shows the current states data about that robot.And the table is updated periodically from the data in the test server.When the updating was not connected it was easy to…
Derek
  • 41
  • 2
  • 8
0
votes
1 answer

creating Custom Widget using QtDesigner PyQt4

Can anyone please suggest me best practice to create a Custom widget using PyQt4 ? I want to see how to approach adding Qpushbutton or QCheckboxGroup inside the cells of QTable Widgets that will be added on user clicking add new row to QTable at…
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
0
votes
1 answer

Updating QTableView with more rows dynamically

I have a QTableView, which uses a model derived from QAbstractTableModel. The model starts out with a number of rows and displays the data properly. The model also has a timer attached to it, which upon expiring, gets the number of rows and columns,…
user1173240
  • 1,455
  • 2
  • 23
  • 50
0
votes
1 answer

Set userData for whole row?

In a QTableView, I have few user data that is associated with some QStandardItem, That every row has one user data (I use row selection mode) Now when user right click on any item on the same row, they get the same data. So my problem is, I set the…
daisy
  • 22,498
  • 29
  • 129
  • 265
0
votes
1 answer

Issue rendering the selected cell on a QTableView

I have a custom QTableView and a custom QAbstractTableModel. The view only allows single selections. I'm trying to customize the background color of the selected cell under some conditions with no success. I expected to do it by combining the data…
Vicent
  • 5,322
  • 2
  • 28
  • 36
0
votes
1 answer

Inserting QTable in QTree

I would like to design a particular layout using QTable inside of QTree. See the followng wireframe : Is it possible to do this, knowing that in number : The first node under Dialog 1 is seperated in 3 (or maybe four). The time, followed by an…
peterphonic
  • 951
  • 1
  • 19
  • 38
0
votes
1 answer

Qt QtConcurrent progressbar update

I have a QTableView connected to a QAbstractTableModel. The model is used with QtConcurrent::map to make threads for the application (copying files) I subclassed QStyledItemDelegate to display a QStyleOptionProgressBar in one of the tableviews…
0
votes
2 answers

QTableView does not get the Background color of the central widget

I have a QMainWindow. To that window, I've set a Central Widget. I have a Vertical Box Layout, and have added some widgets to the Layout, including a QTableView. I've set this Layout to the Central Widget and have set a Background colour for this…
user1173240
  • 1,455
  • 2
  • 23
  • 50
0
votes
1 answer

QTABLEVIEW setSpan sometimes some sperate-lines disappears

I'm trying to use QTABLEVIEW::setSpan() to make a table with some cells nearby merged into one,but sometimes it comes out correctly, sometimes some seperate-lines disappear,don't know why.i doubted that the reason is that what the data it showed…
jude
  • 31
  • 1
  • 3
0
votes
1 answer

How to create combo filter for Qtables in pyqt

I have below code snippet from the help of stackoverflow followers. I am able to filter the table now. but when i try to filter it sorts first as i enabled sort for the view. I want to create the QTableview such a way that if i click on header it…
Rao
  • 2,902
  • 14
  • 52
  • 70
0
votes
1 answer

How to list only the visible items in QTableView in pyqt

I have below code to get filters for QTableView. But i am not able to filter multiple column at a time. i.e., if filter column 2 with row 0 col 0 and try to filter column 2, it should show only the visible unique values of column 2 (probably it…
Rao
  • 2,902
  • 14
  • 52
  • 70
0
votes
0 answers

Displaying std::map in a QTableView

I have a some sort of data stored in a std::map and need to display that in a QTableView. So I've my model class from QAbstractItemModel, but I'm faced with a problem: The "data" method gives me a QModelIndex that contains the expected row-number of…
0
votes
1 answer

Data in the qtableview's vertical header?

Tableview use a QSqlRelationalTableModel. How can I insert data from a column in the vertical header?