I’m a little bit confused about the use of the “self” parameter with some widgets like (QLineEdit), indeed when learning to use the QLabel widget, I used to call the class without the self paramater, or when using the QLineEdit widget, the widget wouldn’t work without the “self” parameter, here’s the code I’m working on : So here is where
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
Open Window when Clicked on Push Button in Main Window PyQt5 Python
I have gone through the various post similar post which are having similar problems, tried out the answers also but it didn’t worked for me. So here is my problem – I have two windows – TestBox and MailBox, when i click on the TestBox Pushbutton along with Input Path argument, it has to open the MailBox Window, This new
Creating a non-overlapping QVideoPlayer and PlotWidget in PyQt5
I am trying to create an app in PyQt5 that has a media (video) player, a graph, and a few buttons. Currently, whenever I try to add the video and graph widgets, they compete for space (lay on top of one another), even when using QGridLayout. Here is the entire file so far. The important parts are under ‘Create video
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:
How to multiprocess multiple plots in a single PyQt GUI instance
I have a plot object called CrosshairPlotWidget. Each plot object spawns a thread which updates its data but these threads are still within the same main GUI process. Here’s what I currently have and an illustration: 1 main GUI process with 2 threads I want to run the two plots each in a separate process, but both within the same
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