Skip to content

Tag: pyqt

PyQt5 – Show virtual keyboard

I’m trying to figure out how to use a virtual keyboard for a touchscreen, using python 3.8 and PyQt5 on Windows. I saw that Qt had his own plugin QtVirtualKeyboard. I pretty much followed what has been done in this link, first installing Qt 5.15 with the Virtual Keyboard support, and then setting up the…

QGridlLayout with non-stretchable-height rows

I’m trying to build a QGridLayout with stretchable-width columns but non-stretchable-height rows. The grid in inside a QScrollArea, and with the exception of the height, it’s almost working. You can see it in the following images: As you can see, the rows are being vertically stretched. I would li…

Move pyqt button out of list of buttons

I have a list of pyqt4 push button and want to move the position. Since it is troublesome it make lots of buttons variable I create them through a list. The code below don’t work for specify the position but works fine. What’s the reason behind? Answer If you want to manually specify the geometry …

How to play videos in pyqt

I want to play video files depending the select file in this function: My Question is what opcion i have to use or what module to play video files in pyqt EDIT: To play the code of S. Nick I hace to install K lite code Answer Try it:

Python PyQt5 QTreeView set row Background Colour

I am trying to set the background colour (color) for a) a whole QTreeView, and b) for specific rows in a QTreeView within Python. I have found setColor and setBackgroundColor methods, but neither seem to work for me with QTreeView nor QStandardItem. Lots of googling shows many conversations about it, but I ha…