All Questions
Tagged with python-3.x pyqt5
3,162
questions
0votes
0answers
9views
Using matplotlib and PyQt5
I'm writing code to update a matplotlib graph in real time while embedded into a PyQt5 application. Separately, the two pieces of code (for the graph and the embedding of a still graph. Putting the ...
0votes
0answers
9views
Atfer lauching my Gui in my main program , it don't keep on [duplicate]
i create a little program with a GUi (PyQT5), my windows is programmed in my "Dailog.py" and all actions and calculations will be on my main...
But when i lauch my main which is calling my ...
-2votes
0answers
8views
Get all visited links show them using Qwebengineview pyside2 /pyqt5
I searched a lot but can not find about it.
What I want
I want to get all history of visited link and show them by using a button in pyside2/pyqt5.
(like when we clicked on history button in chrome ...
0votes
1answer
16views
How to set QTable cell always in edit mode?
I have a table that need all table cell always in edit mode, I forgot how to set this behavior now, can someone give some tips?
The Demo
import os
import platform
from PyQt5.QtWidgets import *
from ...
0votes
0answers
11views
QLineEdit setText
How may I able to fix this problem, I have a 2 frames, 1 frame will accepts a 5 inputs using QlineEdit and the other 1 is just a Empty frame, How to retrieve the given input in the QlineEdit? and ...
0votes
1answer
18views
Make a Translate of multiples words
I’m trying to make a translator who translates phrases and texts from German to Portuguese
The code takes the information in the ´´´QLineEdit´´´ and translates it by pasting the translation into the ´´...
1vote
0answers
17views
pyinstaller fails to include the QtMultimedia library
I'm trying to create a executable binary for a python codebase using pyinstaller. When running pyinstaller on Linux it creates the binary, but the binary fails to run because pyinstaller doesn't ...
0votes
1answer
27views
Get QKeySequenceEdit value
Am having issues getting the value of my "QKeySequenceEdit", I need to get this value to print it on a label and console.
This is my code:
##Create my KeySecuenceEdit
self....
-2votes
1answer
27views
Python3.9 PyQt6 'NoneType' object has no attribute 'setText' Error
Firstly my english not good, if i do mistake i'm so sorry. I'm developing a personal app about converting subtitle file with 'ISO-8859-9' encoding system, my first app runned perfectly without gui, ...
0votes
0answers
18views
How to call a function in another function pyqt5 [closed]
I would like to call a function named search_method() in two other different functions table_query() and combo1_query(). I get this error - NameError: name 'search_method' is not defined. I want the ...
0votes
0answers
16views
PYQT5 dont zip the animation
My goal is to animate a frame by expanding it if the mouse is over and zipping when the mouse is out.
My interface https://ibb.co/cbVF8M1
What expands do if the mouse is in the area https://ibb.co/...
0votes
0answers
14views
Can the style of a custom QFileDialog be changed
I did a custom QFileDialog in other to add a label and a check box to it. It works the way I want but the problem is that when you modify this class the style changes since we aren't calling the ...
-1votes
1answer
20views
PyQt5 keyPressEvent blocks reading keys by QWebView page
I want to set Escape key as one that exits application
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Escape:
self.close()
but when I do that QWebView loses ...
0votes
0answers
38views
Python logging doesn't work in PyQt GUI application [closed]
I'm using Python 3.7 and PyQt5. I have logging working as I like in regular python (no QT GUI):
logFilePath = 'myLogFile.log'
logFormatString = '%(asctime)s %(levelname)s %(module)s %(funcName)s - %(...
0votes
0answers
8views
python pyqt5 GtkDialog mapped without a transient parent. This is discouraged [duplicate]
File: untitled.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name=&...
0votes
0answers
21views
PyInstaller weird PyQt5.sip import causes a failed EXE [duplicate]
PyInstaller builds EXE package and when I try to launch it:
Traceback (most recent call last):
File "aplikacja.py", line 8, in <module>
ModuleNotFoundError: No module named 'PyQt5....
1vote
1answer
51views
PYQT5: Window does not get the focus
I want to create my own virtual keyboard. However, it always happens that the focus is taken from another window as soon as a button is pressed or the window is opened.
How can I work around this ...
0votes
0answers
20views
QScrollArea crashing when needing to show QScrollBar on resize
I have a QScrollArea containing some labels and one of them has a QPixmap. I want that QPixmap within a label to be resizable and I also want to show QScrollBar only when QScrollArea contents go out ...
0votes
0answers
26views
Connecting comboboxes created in a loop in PyQt5
I'm trying to build a GUI that is generated dynamically based on some input dictionary. I'm using the GridLayout, iterate over the dictionary keys and generate per iteration/grid row the key of the ...
0votes
0answers
34views
QHeaderView going out of viewport
I'm having couple of issues while trying to make a QHeaderView for my QTableView.
I want QHeaderView to be resizable by the user (Qt.ResizeMode.Interactive) while being able to stretch its sections ...
0votes
1answer
16views
After installing pyqt5, designer.exe cannot run
python3.9.5
I installed pyqt5 in pycharm and want to use QT designer.
After adding an external tool, I found that I couldn't run the tool
Pycharm reports the following error: process finished with ...
0votes
1answer
51views
PyQt5 unable to stop/kill/exit from QThread
Borrowing code from : Progress Bar Does not Render Until Job is Complete , I tried to to find way to quit/kill a Qthread while it is working, here my code, you can quit the main window while progress ...
0votes
1answer
21views
Why is QProgressDialog always showing at app startup?
In a PyQt GUI, I will have several workers (QObjects associated to QThread), and 1 QProgressDialog per worker. Each one may have a different lifespan than the other.
I naively made the following ...
0votes
1answer
36views
Play audio with PyQt5
If in playAudioFile is performed, icon has changed but play() method dosen't work. Every time the condition is false.
This code works in some files, but I can't see a rule. Format files and file's ...
0votes
0answers
14views
How can I pin a PqQt label to the top without it getting resized?
I am Trying to pin a label to the top of my window without it getting resized.
I alredy tried alignment=Qt.AlignLeft | Qt.AlignTop, but this results in the exact opposite of what i want:
0votes
0answers
19views
QWidgetAction doesn't show up in QMenu in tray
Actually, my question is the same as this question but the answer didn't help too much, tried the same but didn't work.
I want to make a slider works in the tray but what I got is a blank field only.
...
2votes
0answers
99views
How to convert .py to .exe (32bit)
I created an application using PyQt5, and I'm willing to convert it to a 32bit executable file (.exe) using auto-py-to-exe! I searched a lot about this and figured out that I should use a 32bit ...
0votes
2answers
63views
QComboBox has unexpected behavior when changing stylesheets while Qt.UIEffect.UI_AnimateCombo is set to False
My goal was to make a combo box which shows the down arrow only when the mouse is hovering above it. To do that I subclassed QComboBox and reimplemented enterEvent and leaveEvent which would change ...
0votes
0answers
14views
QComboBox not updating the index
When I printed the item text of the combo box just to see if the value is changing when I change the current text value of the combo box, I found out that it isn't changing but staying at the 0 index ...
1vote
1answer
42views
Plot line over pyqtgraph.ImageView()
I am using Pyqt5 to plot some medical images (numpy arrays) in three different widgets. Now, I want to plot a line over the image (displayed using pg.ImageViewer). Have someone already done this?
...
1vote
0answers
19views
How to move widgwts to next row in a layout PyQt5 [duplicate]
I want to move widgets to next row according to resizing space.Suppose there is 5 label in a row ,but when i resize and there is insufficient size for them some of them will move to next row.
But I ...
1vote
1answer
57views
How to use QtWebEngine createWindow in PyQt5
I am trying to make a window that contains a QWebEngineView. Now I want the browser to be able to handle the create window or _blank type triggers, or specifically to open a URL in a new window when ...
0votes
0answers
11views
PyQt5 application: button press event not working [duplicate]
I have reduced my application as much as I can.
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
class Controller3:
def __init__(self, view):
view.searchBtn.clicked.connect(self....
-1votes
0answers
31views
Confusion with using self in initiating an object
I am new to python and PyQt5. I have confusion like when and why "self" should be used while calling a class, for example, when I call "QToolBar()" I don't send self with it, but ...
0votes
0answers
88views
Pip fails to install PyQt5 (any version) in macOS Monterey
I'm attempting to install PyQt5 through Pip/Pip3 in macOS Monterey. I've updated all Homebrew applications as well as all Pip installations using the recommended process. Every time I attempt to ...
0votes
1answer
31views
Connected function runs twice and exits [duplicate]
I'm frustrated when trying to figure out how to connect correctly editingFinished with a function.
Couldn't make the code shorter, because every time I did, it worked, but I need the other parts.
...
0votes
1answer
68views
How to store the current zoomed image in PyQt5 matplotlib application
I am using this application: OrthoViewLite.
I have put print commands throughout the code in order to see in which part the code is related to the zoom button when I zoom the image. It didn't help. ...
1vote
1answer
15views
Stopping QTabWidget tab value being changed when hovered and scrolling it with wheel
i'm confused about eventFilter. I want fully disable QTabWidget being scrolled when mouse is hovering and wheel scrolling on it.
For example, i made a eventFilter that does scrolling QScrollArea when ...
1vote
0answers
38views
How to ensure that the right DLL's and modules are available when creating a Python PyQt executable on Windows?
I have a large PyQt5 GUI application which runs on Windows and Linux. However, there are many dependencies:
from PyQt5.QtCore import Qt, QRunnable, QThreadPool, pyqtSignal, QDir, QItemSelectionModel, ...
0votes
0answers
20views
How to open different pyqt windows according to different requests from flask
I wrote a program that uses the flask framework to receive http requests and open different ui windows according to different requests,but it always fail down
QObject::startTimer: Timers can only be ...
0votes
2answers
35views
PyQt5 PushButton gradient animation
I am trying to make an animated transition for a QPushButton.
This is the Stylesheet which the button currently has.
QPushButton{
border-radius:5px;
background-color: rgb(49, 56, 68);
}
I want to ...
0votes
0answers
23views
Scalability of the PyQt application
I'm new to PyQt. I created a timer, but I need the application with all widgets to scale to different screens. I guess there are a lot of jambs and mistakes in terms of writing code, but it works). I ...
2votes
2answers
50views
Add Mouse Motion functionality to PyQt based Bezier Drawer
I am trying to modify my code below to take-in mouse events (click, drag, release) such that the control points can be selected and moved, resulting in change in the curve. I am not sure where to ...
-1votes
2answers
42views
How to use variables from another class in one class?
There is a class with a tab, inside of which there are several widgets that have an Add button, and I want to make sure that when this button is clicked, this widget is added to the TEST window, but I ...
0votes
0answers
52views
Python PyQt5 black window showing instead of transparent in Raspberry PI 4
I'm working on a Raspberry Pi 4 project and in this i have to create a transparent window, so I developed code using Python and PyQt5 and it was working perfectly but i needed to create documentation ...
0votes
0answers
54views
PyInstaller : Unable to find "/usr/sbin/neato" when adding binary and data files
i made a pyqt5 translator app , it works fine from the interpreter ,
knowing that i use kali linux & pyqt5 & qt designer & pyinstaller == 4.9 .
i ran this command on my terminal :
...
0votes
0answers
12views
How can I resize my QWidget in a QFormLayout?
I tryed to resize my send button when it is in formlayout but isn't working
How can i resize it and still leave it in the layout?
class MainWindow(QWidget):
def __init__(self):
super()....
0votes
0answers
12views
PyQt5: How can I have separate username and message areas for my GUI chat client?
In the attached image (from HexChat), the wrapped message never goes to the same level as [21:44:03] -Global-, anyone have any idea how I can implement this in my GUI program? Preferably with PyQt5 ...
0votes
0answers
30views
ImportError: No module named PyQt5.QtWidgets after converting python2 to python3 and pyqt4 to pyqt5
I have a program that was written in python2 and PyQt4 that I want to upgrade/convert to python3 and PyQt5.
I have changed the code/syntax from python2 to 3, and fixed the imports from PyQt4 to PyQt5, ...
0votes
0answers
34views
put button inside qtablewidget cells
I am a beginner and I designed two windows with QT Designer
I have a table that I want to put a button in the second and third columns and clicking on them will open a window.
I wrote the code, but ...