Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 2 months ago. Improve this question
Tag: pyqt5
How to deactivate a QVideoProbe?
According to the docs “If source is zero, this probe will be deactivated” But calling setSource(0) gives the following exception: Im running my code on raspberry pi 4 with Rpi Os Bullseye 64bit and PySide2 version 5.15.2. Example code: Answer The source object can be cleared like this: In C++, passing zero to a pointer argument means the function will
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. 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
How to assign variables to worker Thread in Python PyQt5?
I have designed a GUI program using pyqt5. I have a main thread and a worker thread. When the GUI starts, i get some inputs from user such as age, name, … and i want to process the inputs in worker. For example How can i send the inputs which i get using self.ui.firstname.text() to the worker? in other words,
How to call a function periodically while my MainWindow is active?
I have tried doing it with multiprocessing module to no avail. I get the following error: TypeError: cannot pickle ‘MainWindow’ object Answer the proper way to do this is to not use any sort of parallel mechanism, instead use QTimer.singleshot, as QT doesn’t work well with multiprocessing or threading, and if you want to repeat it then you can just
QDockWidget does not dock any longer on doubleclick in pyQt5
I had a solution in pyQt4 to undock-dock a tab from/to a QTabWidget by using QDockWidgets and the code below. After floating a tab, the re-docking was obtained by double clicking the titlebar of the QDockWidget. But it does not work any more in pyQt5 (the double-click does not seem to trigger a topLevelChanged event). Why? How to fix it
Trio + PyQT5 in one program?
How can I use trio in conjunction with PyQT5? The thing is that my program has interface written using PyQT5, and now I need to run eventloop trio, to work with the network, because I use trio WebSocket to connect to the server. I read that I should use trio.lowlevel.start_guest_run for this purpose. But in the documentation it says that
How to merge two images in openCv(python)? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 months ago. Improve this question I extracted Red channel at this image and I created a rectangle for this image I want to blending as merge this two images and
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