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

Updating a Qtablewidget from contextmenu linedit-pyqt

I have a QTableWidget with which I would like to update from a QLinEdit embedded into a context menu. Now, in the QLinEdit a server name is entered, when the key is pressed the program scans MySQL database to see if the server name is in it, if it…
user1582983
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
1 answer

Qt : event invisible widget?

For some reasons, I need to draw a widget onto one another. The structure is the following (see the image) : I have an original QTableWigetItem On the QTableWigetItem, I create a QWidget at the foreground with the same geometry This QWidget…
Vincent
  • 57,703
  • 61
  • 205
  • 388
0
votes
1 answer

Qt : coordinates with scrollbars?

I have a widget MyTable that contains a QTableWidget *table. This QTableWidget has a header for the columns QHeaderView *header, given by table->horizontalHeaderView() Ok, now I want to draw a widget in the section n°1 of the header. Currently, I…
Vincent
  • 57,703
  • 61
  • 205
  • 388
0
votes
1 answer

Qt : execute a slot each time a QTableWidget change its geometry?

I've made a widget derived from QTableWidget and I would like to execute a slot each time the a column or a line is resize, and each time the widget is resized. How to do that as there is no signal for that ? Thank you very much.
Vincent
  • 57,703
  • 61
  • 205
  • 388
0
votes
2 answers

Populating a table in PyQt with file attributes

I'm trying to populate a QTableWidget with the attributes of a file opened elsewhere in the script. I've successfully set the file attributes read in from the file using the following code: class FileHeader(object): fileheader_fields=( …
Victoria Price
  • 637
  • 3
  • 13
  • 26
0
votes
1 answer

Pointing a specific part of the table when app is opened

I am developing an app in windows using Qt. This app displays a table that contains some data. Depending on the time a certain row is highlighted. The window size of the application is fixed. The number of rows exceed the height of the window, so we…
0
votes
1 answer

What is the right way to keep a QtTableWidget and a list in sync, in PySide?

I have a simple list: mylist = ["foo", "bar", "baz"] and a QtTableWidget with 1 column. I would like to keep the data in mylist in sync with that in the QtTableWidget, including allowing drag-and-drop reordering (i.e., the user can do that, and…
Daniel
  • 2,032
  • 5
  • 21
  • 27
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

QT QTableWidget not appearing in QTabWidget

I have an application which uses multiple tabs. I used QTabWidget. On some tabs I needed to show tables, so I used QTableWidget. The code snippet is: QWidget *qwgt = qPreviewTabs->widget(Index); QTableWidget *qDrvTab = new…
hiranes
  • 17
  • 10
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

Connect various Signals from CommanLinkButtons from a QTableWidget

I've put some CommandLinkButtons with some loops into a QTableWidget: QCommandLinkButton *MysticalButton = new QCommandLinkButton; QueryReturn = ModHandling->ModuleXML("attribute",ModuleList.at(iMod),"Settings","Icon"); QIcon…
yokmp
  • 145
  • 2
  • 10
-1
votes
0 answers

How to change the value of the QPushButton in a QScrollbar in QT C++?

Does someone know how can I change the value when we click on the QPushButton on a scrollbar ? image of my QtableWidget It goes 1 by 1 and I would to upgrade to 5 by 5 for exemple. I already tried function like setPageStep or setSingleStep but it…
Zic
  • 1
  • 2
-1
votes
1 answer

QTableWidget cell widgets dissapear after swap

I have QTableWidget with 3 columns. First column contains QTableWidgetItem with row name, two other columns contains two cell widgets. I tried to swap table rows with the following code: connect(upButton, &QPushButton::clicked, this, [this,…
willy_j
  • 25
  • 6
-1
votes
1 answer

Trying to get a button to fetch data from database Pyside6

Building a desktop app using pyside6, trying to get the refresh button to fetch data from a mariadb and insert into a table widget Class Connectionmaria(): def init(self): print("yes 9") self.host = "127.0.0.1" self.user = "root" self.password =…