Skip to content
Advertisement

Tag: pyqt

PyQT: Storing multidimensional data and displaying as QTableView using model/view framework

EDIT: I’ve changed my approach since asking this question – see answer below. I’m building an application which displays data in a series of tables. I’m currently using PyQT’s item-based QTableWidget and manually updating the tables whenever data changes. I’d like to migrate to a model/view architecture using QAbstractItemModel and QTableView. My data has 3 dimensions: I’d like to store

qtablewidget get new value after hitting “return”

i have a qtablewidget which is updated asynchronosly. now i am trying to set new values into the cells and read them back after hitting “enter/return”. i have a function that catches the keypressevent and try to read the actual value from the cell that was changed. the problem: i only get the previous value of the cell, not the

Why the horizontal scroll bar does not show up in PYQT6 QtextEdit widget

In the example below I am using PyQt6 to create text with long lines that exceed the QtextEdit widget’s viewing size vertically and horizontally. The vertical scroll bar shows up however, the horizontal scroll bar does not show up. Any help with this issue is appreciated. Answer If you want a horizontal scrollbar, you will need to set the QTextEdit

PyQt5/Pyqtgraph Get Numpy Array for What is Currently on the Scene

I have a pg.GraphicsLayoutWidget with some images and some ROIs displayed . I would like to get obtain a numpy array for what is currently on the scene, just like the export command in the context menu of the viewbox . Let an arbitrary RGB image (i.e. a numpy array) image be given. For example , I am using https://drive.google.com/drive/folders/1ejY0CjfEwS6SGS2qe_uRX2JvlruMKvPX?usp=sharing

how to do a pagination bar in PyQT?

I need to paginate data from SQL tables. I cant find any information about pagination in PyQT or Pyside. Can you help me pls? Answer One way to handle pagination is to use the QStackedWidget for emulating the pages themselves, and regular QLabels as the page links. Then you can override each labels mousePressEvent to emit a signal to the

Advertisement