Questions tagged [qtablewidget]

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

qtablewidget
Filter by
Sorted by
Tagged with
4 votes
2 answers
12k views

QTableWidget. Emit cellChanged signal

There is QTableWidget. I need to send cellChanged signal with row column and text. How can I do this? -- I have already connected signal with slot. I need to send signal.
Ufx's user avatar
  • 2,665
4 votes
1 answer
4k views

what is horizontalHeaderItem

I was following some examples to build QTableWidget with buttons inside cells and there was a suggestion to use QTableWidget.horizontalHeaderItem. Now, this works great but with it I am unable to get ...
tmdag's user avatar
  • 529
4 votes
1 answer
4k views

Change table columns width on resizing window or splitter

Consider there is a QTablWidget and a QTextEdit. Both of them are in a horisontal QSplitte. Let the QTable widget has 2 columns. The problem is to resize the table columns' width as you do resize ...
Narek's user avatar
  • 39.4k
4 votes
2 answers
2k views

QHeaderView has no horizontal lines in Windows 10

QTableWidget headers have no horizontal lines in Windows 10. How can I fix it?
Ufx's user avatar
  • 2,665
4 votes
2 answers
9k views

QTableWidget headers not displaying

I use the UI editor to create a QTableWidget. MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); populateFilesTable(); connect(...
sark9012's user avatar
  • 5,601
4 votes
2 answers
2k views

how to connect rowCountChanged to a slot

here is what i tend to design: when the tablewidget changes(say its rowcount), the label will show the rowcount.But when i tried it, Qtcreator says: Object::connect: No such signal ...
Fay100's user avatar
  • 175
4 votes
1 answer
2k views

getting values of table view headers

I'm not able to access to the values of the headers of a table widget. I'm able to set them like: self.table_widget.setHorizontalHeaderLabels(words) I've tried all the methods of header view object ...
Manuel Zompetta's user avatar
4 votes
1 answer
6k views

QTableWidgetItem set hidden data

Given a QTableWidget, is there a way to set an "hidden" value for a cell (QTableWidgetItem), different from the displayed value? For example, my cell should show "Item 1" text, but double clicking on ...
ABCplus's user avatar
  • 4,011
4 votes
2 answers
4k views

QTableWidget : personal widget as header?

What is the easiest way (without subclassing QTableWidget if possible) to put a personnal Widget (which is a group of QPixmap + QLabel + QComboBox in my case) as headers in a QTableWidget ? It is ...
Vincent's user avatar
  • 59k
4 votes
1 answer
6k views

How to change the height of a horizontalHeader (QTableWidget)

I have a QTableWidget and I want to change the size of the horizontalHeaders. But there is only a function to set the width. But how do you change the height? Hope someone can help me.
user427305's user avatar
4 votes
1 answer
11k views

How to update QTableWidget?

My objective is to update the QTableQidget when new contacts are added. I have no problem adding the contacts or them showing up in the QTableWidget. My problem is that I have to exit out the program ...
irunintotrees's user avatar
4 votes
2 answers
8k views

Qt widget for displaying large amount of data rows

I am trying to display a large amount of columnar records in a scrollable view using Qt (5.1). The number of rows I would like to be able to browse can vary from 100 million to 1 Billion, say. The ...
Spacen Jasset's user avatar
4 votes
1 answer
2k views

Display a huge sheet with QTableWidget

I need to display data using the PyQt class QTableWidget. But there could be dozens of thousand lines. Displaying the whole sheet makes the appli to hang... So I found a solution consisting on ...
VGO's user avatar
  • 2,191
4 votes
1 answer
2k views

QtDesigner & PySide: QTableWidget don't get accessible

I made a form in QtDesigner. This form gets loaded from PySide with help of the function widget = loader.load(file, parent) However, the QTableWidget (with objectNname buffer_table) don't get ...
AkaBkn's user avatar
  • 175
4 votes
1 answer
2k views

Select QTableWidget rows only by clicking row header

I have a QTableWidget. I have set its selection behaviour with myTableWidget.setSelectionBehaviour(QTableWidget.SelectRows) Now I can select rows by clicking the cells of the table. But I want to be ...
okorkut's user avatar
  • 491
4 votes
0 answers
394 views

How to make table view corner items corners round?

I have a QTableWidget (alternatively, a QListWidget) which I want to style in the following way: The "selected" color of the cells should be a certain fixed color. I am able to do this by ...
Borage's user avatar
  • 43
3 votes
2 answers
5k views

How to disable QTableWidget scrolling to selected cell?

Currently, if the user clicks on a cell that is only partially visible, the window automatically scrolls over so that the cell is fully displayed. Is there any way to stop the table doing this? Thanks
cindyln's user avatar
  • 33
3 votes
2 answers
4k views

How to create a SIGNAL for QTableWidget from keyboard?

I have a table and move around inside with left, right, up, down buttons. Now I need to create a SIGNAL when I stay in a certain cell and press SPACE button. This SIGNAL should bring also the ...
trangan's user avatar
  • 351
3 votes
2 answers
4k views

Python: numerical sorting in QTableWidget

I need first column of my QTableWidget to be populated as: Row: 1, Row: 2...Row: 100 , but sorting doesn't work as expected (numerically). Sorting works fine with this code, but I don't get expected ...
Aleksandar's user avatar
  • 3,591
3 votes
1 answer
15k views

writing a QTableWidget to a .csv or .xls

Is it possible to write the contents of a QTableWidget to a csv? I found a question about writing to an .xls using xlwt, but can't seem to get it to work using my code. def saveFile(self): ...
Victoria Price's user avatar
3 votes
1 answer
6k views

How to sort a QTableWidget by column by clicking on the header of the column?

I am building a database for my work. I want to be able to sort the elements in a manner similar to how you can sort elements in excel by clicking the header of a column. I am using the pandas library ...
Chris Ray's user avatar
3 votes
1 answer
4k views

How to select a QTableWidget cell containing a button

I have a question regarding QTableWidget at PyQt4. Say I have a QTableWidget, where I want to have an event connected to a cell click using: table.cellClicked.connect(cellClick) then, cellClick ...
matt_1's user avatar
  • 81
3 votes
1 answer
7k views

QtableWidget does not show data

I have a class that creates random data which I would like to show in a tableview on the main window. I added via Designer a table view to the main window and called it tblData. I suspect the problem ...
RogerWilco77's user avatar
3 votes
1 answer
17k views

QTableWidget edit only one column and leave the rest non-editable

In QT 4.7, I am trying to make one QTableWidgetItem in a QTableWidget Editable and the rest all columns should be read only for me. I am having problems here. I have checked a number of samples ...
Muthu's user avatar
  • 2,675
3 votes
1 answer
7k views

Retrieve value of QTableWidget cells which are QLineEdit widgets

I create a QLineEdit,set a validator and put it on the table with this code: ui->moneyTableWidget->setCellWidget(rowsNum, 1, newQLineEdit); Then I've got another class for manipulating the ...
Segolas's user avatar
  • 575
3 votes
1 answer
21k views

How do I get text from an item in a qtablewidget?

I want to highlight all of the cells in my table that have the same value in the first column, but have a different value in any other cell. So, for example, if I have two records in my table: test, ...
Tim Hutchison's user avatar
3 votes
5 answers
9k views

How to Copy and Paste multiple Cells in QTableWidget in PyQt5?

I have a Qtablewidget shown below. I want to copy multiple cells from the table and paste in other row in the same table. So far, I can do the same on single cell, but is there a way i can do ...
Vi_py123's user avatar
3 votes
2 answers
20k views

How to set cell border and background color in QTableWidgetItem?

I have a QTableWidget with 3 columns. 2 of the columns have some text in them, but one of them is empty and I want it to have a background color. Also I want the cells to have borders. If I do int ...
N Alex's user avatar
  • 1,014
3 votes
1 answer
11k views

How does a button delete a row in a QTableWidget where it sits

Basically I have a delete button for each row in a QTableWidget for the click event. How do I find the row index of that particular button that get clicked? class WidgetGallery(QDialog): def ...
cynric4sure's user avatar
3 votes
2 answers
8k views

How should I connect CheckBox clicked signals in Table Widgets in PyQt5?

I would like to add various widgets to various cells in a Table Widget, and I would like to trigger commands when those widgets' values are changed. I can get the widgets into the table as desired, ...
ToddP's user avatar
  • 672
3 votes
1 answer
17k views

Qt how to insert string inside a cell in QTableWidget

Possible duplicate: Filling some QTableWidgetItems with QString from file How to insert rows at run time in a QTableWidget? How to insert hard coded strings in the cells of this QTableWidget? Here's ...
cappy0704's user avatar
  • 557
3 votes
8 answers
11k views

Disable selecting row or column by clicking the header in QTableWidget

I have a QTableWidget and I want to disable the behavior that a row or column is selected when you click on a row or column header. Does anyone know how to disable this behavior? Edit: The headers ...
Oli's user avatar
  • 1,291
3 votes
2 answers
9k views

Resizing a cell's height and Witdth and loading an image in QTableWidget

I want to make a 8*8 table with square cells ( a chess board ). Now I have the code to make the table but don't know how to resize the cells to be square shaped. I also want to put pictures of pieces ...
Omid's user avatar
  • 5,993
3 votes
2 answers
5k views

QTableWidget::itemAt() returns seemingly random items

I've just started using Qt, so please bear with me. When I use QTableWidget->getItemAt(), it returns a different item from if I used currentItemChanged and clicked the same item. I believe it's ...
Jordan Milne's user avatar
3 votes
3 answers
10k views

How can I retrieve data from a QTableWidget to Dataframe?

I have a QTableWidget in editable mode in which user puts in integer input , how can I generate a list of data entered in this table so as to perform operations on it , here is my manual code for ...
Rishabh Gupta's user avatar
3 votes
3 answers
3k views

Qt - can QTable have column labels rotated by 90 degrees?

I have many narrow columns with very long labels. I want to rotate the labels by 90 degrees. Is it possible?
danatel's user avatar
  • 4,924
3 votes
2 answers
2k views

How to PageUp/PageDown table with QTableWidget?

I am using QTableWidget i have set 100 rows and 2 columns, now i need to table scrolling with pageup and pagedown buttons. i'm trying to browse the table with PageUp/PageDown buttons, but the buttons ...
Roger's user avatar
  • 67
3 votes
1 answer
294 views

Is it possible to show the right side of a string first in an overfilled QTableWidgetItem?

The user is prompted with a file dialog and chooses a full path which is then put inside a QTableWidgetItem cell within a parent QTableWidget. Currently, when there is an overflow of text in the item ...
Mets_CS11's user avatar
3 votes
1 answer
5k views

how to get the selected combobox value from QTableWidget?

I have created a QTableWidget in which for a column I am setting a combobox QComboBox using setCellWidget function. It works fine . This is how i set up the qtablewidget cb = QComboBox() cb....
Abhijit Gujar's user avatar
3 votes
1 answer
2k views

QListWidget drag and drop with a custom widget set via setItemWidget

I'm using a QListWidget to display custom widgets by setting them with setItemWidget. Something like this: QListWidget* listWidget = new QListWidget; listWidget->setAcceptDrops(true); listWidget-&...
Anon's user avatar
  • 33
3 votes
1 answer
7k views

How validate a cell in QTableWidget?

I work eith pyqt4 in python3.4 I want to validate if the text in the cell is a float number when it is introduced. How I do that?
Reinier Hernández's user avatar
3 votes
1 answer
3k views

sort a column with setCellWidget in QTableWidget

I am trying to sort a column which has progressbar in it. I want column to be sorted by progressbar value. Any help will be much appreciated from PyQt4.QtCore import * from PyQt4.QtGui import * ...
django's user avatar
  • 2,839
3 votes
1 answer
5k views

Qt Problems Adding Table Widget Items

I have an invoice form which i am using to both create invoices and display the results of a stored invoice. I when i am trying to read back data from the database and display it i am getting the ...
Root0x's user avatar
  • 472
3 votes
2 answers
4k views

Inserting Images from directory in QTableWidget

Well, hi all. I've got a question. I have a QTableWidget where I need put images from directory and retrieve name of image that was in selected cell. How can it automatically generate number of rows ...
Azraith Sherkhan's user avatar
3 votes
1 answer
8k views

QTableWidget Item Get Widget Type and Access It

I am attempting to sum rows in a QtableWidget and I get a segmentation fault when doing so not sure what is causing this, but I think it has something to do with the fact that I am setting the cell ...
Talon06's user avatar
  • 1,756
3 votes
1 answer
4k views

QTableWidget Force Single Item Selection

In PyQt how can I force a QTableWidget to only accept a single section (so that you can't select more items with Shift or crtl)?
user2339945's user avatar
3 votes
3 answers
11k views

Custom Sorting in QTableWidget

I have a QTableWidget and i am using its default sorting capability through header columns but one of my column in QTableWidget is integer type and through QTableWidget default sorting it is being ...
kapil vermani's user avatar
3 votes
5 answers
5k views

Find out which column is selected in a QTableWidget

I have a QTableWidget with SelectionMode set to SingleSelection, and SelectionBehavior set to SelectColumns. This means that only a single column can be selected. But I later need to find out which ...
sashoalm's user avatar
  • 77.3k
3 votes
1 answer
2k views

QTableWidget::item() QTableWidget::cellWidget ()?

Does anyone know the relation between return value of QTableWidget::item(x, y) and QTableWidget::cellWidget (x, y) in the same QTableWidget and same row.column.?
Al2O3's user avatar
  • 3,153
3 votes
1 answer
5k views

how to translate string added dynamicaly in Qapp with Qtranslator?

i trying to created a Qt application multilanguage with Qt linguist. I place this code in an function of my MainWindow : translator.load(":/lang/English"); qApp->installTranslator(&translator);...
Gat's user avatar
  • 115

1 2
3
4 5
25