qtableview Questions

1

Solved

I'm struggling to set column width manually in a QTableView. Why doesn't this piece of code work? tabb = new QTableView; tabb->resizeColumnsToContents(); for (int col=0; col<20; col++) { ...
Chrissy asked 31/10, 2014 at 18:53

3

I have a QTableView to display some informations of a database in the form of a grid. One of the fields is a path to an image and I would like to display these images in my table. I tried somethin...
Koller asked 24/6, 2011 at 7:31

3

Solved

I'm not sure how to ask this, so, feel free to ask for more information. It seems that tableView->resizeColumnsToContents() will only resize all the columns based on data in current view. Which...
Infamous asked 8/8, 2010 at 8:46

2

Solved

I have got a QTableView with data in it. What is the simplest way to add a row? Thanks!
Majordomo asked 29/10, 2012 at 8:45

2

Solved

I am working in Qt 4.7, and have a dialog containing (among other, unrelated things) a QTableView and a QButton. When the QButton is clicked, it must clear all the data from the QTableView. I...
Webby asked 7/4, 2014 at 15:49

2

Solved

To add new rows to model I am calling beginInsertRows and endInsertRows(). How to configure the view to scroll to new added rows and select it. I can do it by sending some signals but maybe Qt has ...
Desquamate asked 30/9, 2013 at 19:53

1

Solved

So I have a QTableView and I only want to let column sorting on column 1 but not column2. Naturally I tried to installEventFilter on QHeaderView or QTableView, but MouseButtonPress event is not be...
Nylons asked 23/2, 2014 at 20:14

2

Solved

I want to add a right click menu to delete, rename or open image in each of cell of QTAbleView in the rigt click menu, I have tried and found everyone is trying to add menu to a header in tableview...

1

I have a QWidget and inside that, there is a QTableView. I need to have a find functionality on the first column of the table, so when I click on Ctrl+F, a find dialog will pop-up. class Widget(QW...
Olfactory asked 19/12, 2013 at 23:9

1

Solved

I am attempting to disable editing in my table view. I came across this thread which states that you could do the following tableView.setEditTriggers(QAbstractView::NoEditTriggers); My question ...
Descry asked 16/11, 2013 at 20:24

1

Solved

I am unable to use QMouseEvent with QTableview in order to get the data of a clicked cell.
Sidesaddle asked 18/10, 2013 at 5:12

1

Solved

I have QTableView and QAbstractTableModel. I require rows to have height equal to 24. I know the only way to do this is by calling QTableView::setRowHeight. Since the model is dynamic it may be add...
Pisa asked 10/10, 2013 at 19:32

2

Solved

I currently have a tableview attached to a class that is derived from QSortFilterProxyModel. Now I wanted to know if there is any way by which I can store the order of columns since the users tend ...
Heartbreaker asked 28/9, 2013 at 0:53

1

Solved

I wanted to know how we can change the order of columns in QtableView by dragging ? I currently have a class derived from FilterProxyModel as source to QtableView. I am using QT 4.8
Peccable asked 17/9, 2013 at 16:10

1

Solved

I have created a table using QTableView and a QStandardItem widget. How to remove the vertical header from QStandardItemModel?
Almazan asked 5/9, 2013 at 7:26

1

I have a QStandardItemModel that provides data for a QTableView and a thread that inserts data into the model. Is it possible to temporarily stop the model from updating the table view, and enable...
Roundy asked 22/6, 2013 at 15:34

4

Solved

I'm trying to get the text at a certain cell in a QTableView. For example: QString codestring = "*" + ui->tblInventory->indexAt(QPoint(0,2)).data().toString() + "*"; This should get the te...
Jargonize asked 21/11, 2010 at 7:53

1

Solved

I'm using a QTableView with a QAbstractTableModel and a QSortFilterProxyModel so that I can sort the items by clicking on the table headers. I'd like to add the option for the user to sort the rows...
Guesstimate asked 28/8, 2012 at 22:46

2

Solved

The sample code below (heavily influenced from here) has a right-click context menu that will appear as the user clicks the cells in the table. Is it possible to have a different right-click contex...
Shivery asked 16/10, 2011 at 2:57

2

Solved

I am new to this Model/View Framework of Qt. In my application I want to have 1000 X 1000 cells. There should be minimum memory requirement & it should be fast. I don't know what this Model ter...
Unbacked asked 8/3, 2013 at 9:42

1

Solved

I have a Sqlite model of several 1000 rows attached to a QTableView. I can view the rows in the QTableView but when I scroll to the bottom of the QTableView, I can only get to the end of the first ...
Spontoon asked 15/2, 2013 at 4:45

1

Solved

I've a QTableView. Is there a way to align to the centre, all the cell contents of this view? I'm not using any delegate. It's just an AbstractTableModel which is added as a model to a QTableView...
Rayraya asked 7/2, 2013 at 13:46

2

Solved

I am currently reading model/view tutorial from Qt, but I am still not sure if I should use model/view or widget for my Qt program : I need to do a logger application that will monitor all informa...
Hudgens asked 22/1, 2013 at 14:46

2

I want to know how can i set the custom header names in QTableview when i create a QTableview i get the column and row header names as 1,2,3,4. I want to know how can i set my own column and heade...
Gilmagilman asked 3/1, 2013 at 8:47

2

Solved

I have application that for now starting few threads ( like 5 – 10 ) to collect data from different source . They are separated from the main GUI thread so I don’t feel any slowness in the GUI and ...
Coben asked 28/11, 2012 at 12:31

© 2022 - 2024 — McMap. All rights reserved.