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. When I run the above I get this but when I resize the window manually just slightly, I get what I’m expecting How would I get the second image as the state when the app
Tag: pyqt
Is there a way to filter widgets in a ScrollArea with a QLineEdit based on specific attributes?
I’m doing an app in PyQt through Qt Designer and I’ve populated a (container widget inside a) Scroll Area with a list of cards (custom widgets that contains informations). I’ve put outside of the scroll area a QLineEdit and I want to use this QLineEdit to filter the cards based on specific attributes of each card (name, id, username). Is
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
PyQt6 Implementing copy-paste functionality across tabs in same window
I am trying to create a tableWidget in PyQt that has copy-paste functionality and the ability to create new tabs. My table is loaded with a initialized sheet but gives the user the ability to create new tabs with new qTableWidgets which I handled using a for loop to create and initialize the widget everytime a new tab is created
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
Returning value from ListWidget Selection in another class – PyQt5
I’m working on a script where when a user clicks on a button, a pop-up window will appear that contains a list. When the user doubleclicks on an item from that list, a label will populate on the original window with the selection. I’ve got most of the code working, but I’m having trouble on returning the selected value from
What is the best way to detect memory leaks in a PyQt application?
I am developing a PyQt desktop application, on Linux, to be used in an industrial setting. It is basically a sensor data logger which displays real time graph and saves the data into a database. As it must run continuously 5 x 24 hours per week, I need to make sure there is no memory leak for it to run