Skip to content
Advertisement

Tag: pyqt

how to suppress console output from QWebEngineView errors?

I get the following error if I create a QWebEngineView instance from Python instances in different working directories: It seems this is a known issue and will be fixed in QT6: https://bugreports.qt.io/browse/QTBUG-66014 But in the meantime, how can I suppress this message? I tried changing QtCore.qInstallMessageHandler and also x.page().javaScriptConsoleMessage = lambda self, level, msg, line, sourceID: None, neither affected this

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 environment variables. A simple code

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 like all the rows to be equal and to not fit all

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 (position and size) of widgets,

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 have not been able to relate those to

Advertisement