All Questions
Tagged with pyqt5 qtableview
196
questions
0
votes
1
answer
58
views
How to set selected text colour, style in Qtableview string
Below is a small working code to display what I am trying to achieve.
import sys
import os
import sqlite3
from PyQt5.QtSql import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5....
0
votes
0
answers
20
views
Inserting a widget inside a specific cell inside a QTableView [duplicate]
I want custom widget inside a specific cell of the QTableView
I have test code,
Which has a QTableview with these properties
Custom header for each column
Only one row getting selected at a time
...
0
votes
0
answers
40
views
PyQT5 sizing issue with QTableView and QGridLayout
I built a GUI program that has outputs on single line tables, and I recently updated it using QGridLayout to make it dynamically adjust to different system scalings.
The issue I'm having is the pandas ...
0
votes
0
answers
42
views
QItemDelegate own custom Calendar item drawing
Im working on a project where i would like to create a custom Calendar in pyqt. I have a custom model and a custom QTableView with surrounding QDateTime processing functions.
In the paint function ...
0
votes
0
answers
30
views
PyQt5 QTableView with QItemSelectionModel and setCursor method populated by Pandas DataFrame
Wondering if my approach is good. Code works as intended, just want to know if there is a better approach. Want to be able to add this widget to any future project. Is there a better way to make it ...
0
votes
0
answers
92
views
QSortFilterProxyModel - not updating
I am trying to use QTableView with a custom model and QSortFilterProxyModel.
If I set the base model: self.setModel(self._model) the table displays correctly.
However, if I set the proxy model: self....
0
votes
2
answers
171
views
How do I control the data type in a specific PyQt5 QTableView column?
(note: this is my first post here and I consider myself a "journeyman" at Python)
Problem summary:
I have a PyQt5 QTableView populated by a pandas dataframe via an abstract table model
A ...
1
vote
0
answers
125
views
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
I wanna make a MySQL database mapping to QTableView but i got this error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QODBC QODBC3 QPSQL ...
0
votes
2
answers
655
views
Replacing all data in a pyqt table model
I'm working on a game that involves moving 'gems' between a storage bank and a player. I'm using a QTableView to display the current gems of the player with a QAbstractTableModel as the model. When ...
0
votes
0
answers
48
views
Why are the rows missing? QTableView + QSqlRelationalTableModel [duplicate]
I can't figure out the strange display behavior of QSqlRelationalTableModel.
setEditStrategy of the model is set to OnFieldChange. I'm trying to change the values in the cells, but the whole row ...
0
votes
1
answer
67
views
Strange behavior of QTableView pyqt5
I am just getting into PyQt5 framework and got stacked while editing cell in my QTableView table.
I have a model like that:
class TableHMQIModel(QAbstractTableModel):
headerLabels = []
def __init__(...
0
votes
0
answers
88
views
Setting Pandas data into Qt's GUI (Python)
I have tried to use several QWidgets, but none gave me a working solution.
Here's an example that works when I run it:
import sys
from PySide6 import QtCore, QtGui, QtWidgets
from PySide6.QtCore ...
0
votes
1
answer
668
views
PyQt QTableView resizeRowsToContents not completely resize on initialisation
I have a minimum example here of a QTableView widget that displays a long string that I want word wrapped when I start the app.
from PyQt6.QtWidgets import (
QMainWindow,
QTableView,
...
1
vote
1
answer
1k
views
How to make qtableview display a cell with icon and text
It's OK to just show the image
# L.append([QIcon(r"favicon.ico"), "file", "absolute_path", "modifytime"])
But can't show images and text
# L.append([...
0
votes
0
answers
500
views
Pandas Model (QAbstractTableModel) binded with PyQt5 QTableView Add Rows not working
I'm using a custom Pandas Model(QAbstractTableModel) which is editable. I'm trying to add rows and then the user should be able to edit them and pass the values to the dataframe. Unfortunately, the ...