Questions tagged [qtablewidgetitem]

QTableWidgetItem is a Qt class providing an item for use with the QTableWidget class.

Table items are used to hold pieces of information for table widgets. Items usually contain text, icons, or checkboxes.

The QTableWidgetItem class is a convenience class that replaces the QTableItem class in Qt 3. It provides an item for use with the QTableWidget class.

Top-level items are constructed without a parent then inserted at the position specified by a pair of row and column numbers:

QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(pow(row, column+1)));
tableWidget->setItem(row, column, newItem);
212 questions
0
votes
1 answer

QTableWidget dynamic row creation

I am trying to create a new row in a QTableWidget on an itemChanged signal. Here is the code: Constructor:: { ui->tblRoles->insertRow(0); QTableWidgetItem *twl = new QTableWidgetItem("New Role"); QFont f =…
Ferenc Deak
  • 34,348
  • 17
  • 99
  • 167
0
votes
1 answer

How can I change QTableWidgetItem notation to standardNotation

I have QTableWidget with 3 columns. I multiply numbers in first and second column and write result in third column. Numbers are double. The problem is: result is in scientific notation like "1.4e+3". How can I change notation to standard notation? I…
ekremk
  • 253
  • 3
  • 8
  • 18
0
votes
1 answer

How to get the correct row from QTableWidget::item after sortting by column (Qt BUG ?)?

I'm doing some table stuff in Qt C++, and today I found something very suspicious after I set sortEnabled(true). I wanted to sort QTableWidget by columns and that's why I set that property to true. Logically I've got what I wanted but I've noticed…
Don Angelo Annoni
  • 350
  • 1
  • 2
  • 17
0
votes
1 answer

Inserting QSvgWidget in QTableWidget cell

What I want to do is to load .svg file and show (render) it in qtableWidget cell. First part I've done like this: svgWidget = QSvgWidget("C:\mySVG.svg") svgWidget.setMaximumSize(100,100) next line renders svg like what I…
Aleksandar
  • 3,541
  • 4
  • 34
  • 57
0
votes
1 answer

Catching/Connecting QPushButtons inside a QTableWidget to a function

Im a student developer using Qt to build a GUI to help users plot specific columns of data located in multiple files. The feature I'm setting up allows users to select a file using a button in each row. So the button originally would say browse and…
Wylie Coyote SG.
  • 1,009
  • 6
  • 22
  • 37
0
votes
3 answers

How to update a QTableWidgetItem in a QTableWidget with time?

I am planning to make a countdown timer for passes. A file is given from which i read time given as string and then subtract it from the system time to get the time remaining. This value is to be shown in a QTableWidget as a QTableWidgetItem. How…
0
votes
1 answer

Filling some QTableWidgetItems with QString from file

I'm trying to fill a QTableWidget from a file that was exported by my program, but when I try to set text to the table cells they just ignore me, nothing happens. void MainWindow::on_actionOpen_Project_triggered() { QString line, fileName; …
Lucas C. Feijo
  • 1,002
  • 3
  • 13
  • 29
0
votes
1 answer

Python: CheckBox-es in QTableWidget's column

I've just started to work with python, so I run into problem. I've searched everywhere, but I couldn't find similar example. So, the problem is following: I made a simple GUI using QT-Designer. QTableWidget is being filled out by clicking on button…
Aleksandar
  • 3,541
  • 4
  • 34
  • 57
-1
votes
1 answer

Print Selected data from qtable pyqt5 python

I HAVE TRIED MANY BUILT FUNCTION LIKE : currentItem() selectedItems() TO PRINT SELECTED DATA IN QTABLE OF PYQT5 IN PYTHON WHEN EVER I USE THESE FUNCTION THEY ONLY PRINT THESE import sys from PyQt5.uic import loadUi from PyQt5 import…
Yūjin-A
  • 1
  • 2
-1
votes
1 answer

Argument must be str not tuple

i need to load only the data from database by todays date. date column in database is in TEXT... ''code to load all the data from database'' def load_database(self): today_date = current_date[0:11] while…
-1
votes
1 answer

cellClicked and cellPressed not working for QTableWidget

Whats is wrong with following call. IDBTable is QTableWidget connect(m_GUI->m_UI->IDBTable,SIGNAL(cellPressed(2, 0)), this, SLOT(slotGoToWelcomeScreen()));
user12784615
-1
votes
1 answer

Insert image url into cell tablewidget python

I have problem with insert image from url to cell in tablewidget pyqt5 in python . I want show image in cell. You can see my table on the image from attachments. When i use my code (below) i do not get anything (zero images) in my cell.Please show…
matdud
  • 11
  • 4
-1
votes
1 answer

Get The Row,Column values from a cell in QT

I have a problem, i want to return the selected Rows values, and the columns separately, i found a method to return both of them using the function cell(row, column), but i want to get them separately Here is my code : QTableWidgetItem *c = new…
-1
votes
3 answers

Getting value from QTableWidgetItem

I want to set QTableWidgetItem's data as an image. imagePath may be different each time. QTableWidgetItem *itemMedia = new QTableWidgetItem(); itemMedia->setTextAlignment(Qt::AlignCenter); itemMedia->setData(Qt::DecorationRole,…
Farzan Najipour
  • 2,442
  • 7
  • 42
  • 81
-2
votes
1 answer

Pass dictionary of lists to Qtablewidget - PyQT5

I have used PyQT5 to create the UI of a search engine. I have been able to let the application open a folder containing a pdf file, create an index file, search within it and export the results as txt and excel file. Running the code attached will…
1 2 3
14
15