Questions tagged [qtablewidget]

QTableWidget is a Qt class providing an item-based table view with a default model.

Table widgets provide standard table display facilities for applications. The items in a QTableWidget are provided by QTableWidgetItem.

If you need to use your own data model, then QTableView is preferrable.

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

1192 questions
0
votes
1 answer

search and highlight the items in a qtablewidget

I'm using Python and PyQt and I have created a QTableWidget which I populate with data. Is there a way to search for a specific value and if the program finds something, can it hightlight the rows ?
gigahex
  • 367
  • 1
  • 5
  • 14
0
votes
1 answer

Qt connection QTableWidget and QGLWidget

I am new in Qt and i stacked in a task. I created a QGLWidget and i try to connect it with a QTablewidget. I want to take a variable from QTableWidget which i want to use in order to plot in the QGLWidget. The problem is that there are two classes,…
George
  • 1
  • 1
0
votes
2 answers

Change QHeaderView data

I try to modify the text of my QHeaderView (Horizontal) in my QTableWidget. First question: Is it possible to set it editable like a QTableWidgetItem ? Second question: If it's not possible, how can I do that, I tried to repaint it like this: void…
Slot
  • 1,006
  • 2
  • 13
  • 27
0
votes
1 answer

How to handle column width resizing event

I need to handle columns widths resizing in QTableWidget. How can I do this? -- I talk about event when cursor is under border between to header sections, left mouse button is down and mouse is moving.
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
1 answer

Qt: get text from button in QTableWidget

I have QTableWidget in my Qt application, and I add buttons to it like that: QPushButton *startButton = new QPushButton("start"); ui->tableWidget_tvConnection->setCellWidget(row, col, startButton); connect(startButton, SIGNAL(clicked()), this,…
floppydisk
  • 248
  • 3
  • 11
0
votes
2 answers

Synchronize QTableWidget cell with widget in the center of the cell

I use QCheckBox in QTableWidgetCell QWidget *widget = new QWidget(); QCheckBox *checkBox = new QCheckBox(); QHBoxLayout *layout = new…
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
3 answers

How to get widget from QTableWidgetCell

I use QCheckBox in QTableWidgetCell QWidget *widget = new QWidget(); QCheckBox *checkBox = new QCheckBox(); QHBoxLayout *layout = new…
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
1 answer

PyQt: Let the user edit layout of the widgets

I have a window containing two adjacent QTableWidgets and one full width QTextBrowser beneath them. They are all positioned inside a QGridLayout which spans to the whole window area. Now the problem is that I'd want to let the user deside what size…
user2126173
  • 83
  • 1
  • 2
  • 8
0
votes
1 answer

I want add new Item with its text in empty tableWidget

I have already an empty QTableWidget, and I want to add items to it one by one. I did the following code: void Widget::on_add_btn_clicked(){ ui->tableWidget->insertRow(ui->tableWidget->rowCount()); …
Lion King
  • 32,851
  • 25
  • 81
  • 143
0
votes
1 answer

QTableWidget with checkbox

I need to use QTableWidget with checkboxes instead of text in items. Checkbox must be in the center of item. Examples which I tried work while checkbox is checked. If I uncheck checkbox it disapeares.
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
1 answer

How to end editing QTableWidgetItem

I need to finish edit QTableWidget when some event happend. MyWindow::onSomeEvent { // Finish ui->table editing //... } How can I do this? The event is a spinbox editing. When it happend rows count becomes equled its value. I tried to send…
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
1 answer

Dynamically & sequentially naming & instantiating widgets qt

I'm creating a new instance of QTableWidgetItem for each row the user may add, and adding it to a QVector of QTableWidgetItems. I'd like to do soemthing like the following to name each instance in the following iteration with the row number included…
Rachael
  • 1,965
  • 4
  • 29
  • 55
0
votes
1 answer

Get cell highlight for specfic row & column in QTableWidget using Python pyqt4

I am using Python and pyqt4. My QTableWidget allows multiple cell selections by the user. For a single specific row & column cell in a QTableWidget, I need to read whether that cell has been highlighted by user selection or not highlighted. What is…
panofish
  • 7,578
  • 13
  • 55
  • 96
0
votes
1 answer

Python PyQt QTableWidet: How to implement an "advanced search" function

Say there's a QTableWidget filled with a user's data, and he/she wants to be able to perform an "advanced search" on it using multiple user-defined conditional statements: how would one (the programmer, not the user) go about implementing a function…
Ryan
  • 3,555
  • 1
  • 22
  • 36
0
votes
1 answer

Qt tablewidget data entry, save and access

I am a student and new to qt, I am working on a small project which uses qt tablewidget. Like data is to be entered in the tablewidget and then stored on db amd can be accessed from other page by others. I am not getting how to save the entered…
Muazzam
  • 25
  • 1
  • 11