Skip to main content

All Questions

Tagged with
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....
Badri's user avatar
  • 97
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 ...
Santhosh Dhaipule Chandrakanth's user avatar
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 ...
Tom's user avatar
  • 1
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 ...
AdamGe09's user avatar
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 ...
jergov's user avatar
  • 1
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....
Elad Weiss's user avatar
  • 3,862
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 ...
zicari's user avatar
  • 5
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 ...
KsOnd's user avatar
  • 11
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 ...
pbuchheit's user avatar
  • 1,643
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 ...
papadulo's user avatar
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__(...
Golgi's user avatar
  • 20
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 ...
wojohn's user avatar
  • 21
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, ...
GoblinFace's user avatar
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([...
高永献's user avatar
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 ...
fotiskt's user avatar

15 30 50 per page
1
2 3 4 5
14