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
Tag: pyqt5
Can you configure key event handling in Qt Designer (PyQt5)?
I just discovered Qt Designer today and it’s rather wonderful. But I’m a keyboard fanatic and don’t want to be forced to use the mouse any more than is strictly necessary, or at the very least I want to have hotkey alternatives to any buttons, etc. This can be coded manually but I was just wondering whether you can somehow
How to word wrap the header contents of QTableWidget in PyQt5 Python
I am working on PyQt5 where I have a QTableWidget. It has a header column which I want to word wrap. Below is how the table looks like: As we can see that the header label like Maximum Variation Coefficient has 3 words, thus its taking too much column width. How can wrap the words in the header. Below is
Labels and buttons not appearing PyQt5, Python 3 [closed]
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 years ago. Improve this question
Is it posible to find index-row and values with QRegExp with search name?
I want to find the row-index with searching word using with QSortFilterProxyModel and QtCore.QRegExp. I want to create a list with “mobile” and “email” columns only from the row which is finding from the variable of QRegExp. Below is example code: I want to print the row.index and insert the value of “mobile” and “email” of the row into list_a.
finplot as a widget in layout
I am trying to add finplot, https://pypi.org/project/finplot/, as a widget to one of the layouts in my UI. I created a widget for finplot and added it to the widgets in the layout but I get the following error: Here is the code that I used. Answer The create_plot_widget() function creates a PlotItem that cannot be added to a layout,
How to write correctly PyQT5 event function
How can I correctly write the event function to pass from one QLineEdit to another one by pressing the enter key? I know how to do that in this way: Working Example Now i want to understand how to do the same with this code (i think that the problem is with super() and init but i don’t know why).
How to reverse spinbox selection in PyQt5?
I have a spinbox in PyQt5 like below. How can I make the selection reversed? i.e. If I click down arrow, the value goes up, vice versa. Answer A possible solution is to override the stepBy() and stepEnabled() methods:
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