Skip to main content

Questions tagged [pyqt5]

Qt 5 bindings for Python programming. This allows programmer to make Qt 5 graphical user interfaces using Python syntax.

pyqt5
0 votes
0 answers
14 views

How to change font size of all QLabel objects PyQt5/PyDM

I wrote a GUI but want to resize the text because the labels in the table are overcrowded (see attachment). Here is the code that created the screen/GUI: '''Set up a table to show the coefficients ...
user26436808's user avatar
0 votes
0 answers
17 views

How to interpolate a 2D Scatter plot in python

I have the following problem: I am working with ultrasonic data from a sector scan. An example is shown in the following: From the file I am reading I receive a 2D array. One dimension is the phase ...
mzr97's user avatar
  • 69
0 votes
1 answer
43 views

Cleaner methods for creating multi-variable animations in PyQt5 (css)?

I recently came across an example code for animating a widget using QVariantAnimation, the QVariantAnimation has a start and end point, and the calculated value is injected into the css of the button ...
bfh47's user avatar
  • 13
1 vote
0 answers
20 views

PyQt5 QTimeEdit but with start and end time

Is it possible to create some kind of QTimeEdit but with a start and end time, something like HH:mm - HH:mm? I want to put it in a table just like the QTimeEdit. I already tried to set the format of a ...
Zenn De Craene's user avatar
0 votes
0 answers
19 views

QWebEngineView not rendering pydeck html

I am currently trying to open an html file generated with pydeck in a Pyqt5 webview window. I can open it on my browser (firefox, if that's relevant) and it works correctly. However, if I try to open ...
Luis Manuel's user avatar
-1 votes
1 answer
40 views

Create TimeLine field with PyQt5

I need to develop a program to enter time reports. What I do is very similar to time graphics. I was only able to implement scaling, shuffling and pseudo-infinity fields. The main task is to somehow ...
Code725's user avatar
0 votes
0 answers
15 views

Whenever I am maximizing the subwindow in MDI in Pyqt5 the minimize, maximize and close buttons gets hidden in the extreme right top corner

Inside the method, a new QMdiSubWindow object is created, and its content is set to windowRef. The title of the sub-window is set to subWindowTitle. The sub-window is also set to be deleted when it is ...
Arun Agarwal's user avatar
-1 votes
0 answers
47 views

Sort all items of a PyQt5 QMenu

I am using Python 3.11 and Designer from PyQt5 (QT 5.11.1) for design a graphic file. I create the menu once in QDesigner and converted the ui-file "main_form.ui" to an py-file "...
Arthur Meier's user avatar
0 votes
0 answers
13 views

How can I adjust the program dimensions in pyqt5? [duplicate]

Hello gys i have a problem when i link the designe.ui with the python code and i run it the Programme displayed very small , not like when i run it from QT DESIGNER Images : **MY CODE ** from PyQt5....
Habib Mebdoua's user avatar
0 votes
0 answers
15 views

Issue with Draggable Curve Segment and Y-Axis Alignment in PyQt5 PlotWidget

I have been struggling with a problem for about a month. I have used ChatGPT-4o during this time, but it hasn't provided a satisfactory solution. The issue is as follows: When a user clicks on a part ...
negar's user avatar
  • 9
0 votes
0 answers
26 views

qasync with IPython hangs on run_until_complete

I would like to have an asynchronous gui with PyQt5. The synchronous version of what I want would look like this: from PyQt5.QtWidgets import QPushButton, QMainWindow import asyncio import time import ...
Marc's user avatar
  • 1
0 votes
0 answers
9 views

PyQT5 WebEngineView no import of js files. Live Server with the same files works

The WebEngineView of pyQT5 does not import needed js modules. Here is a minimal example that runs normally in the Live Server of Visual Studio Code: cube.html (works with Live Server, Demo from three....
Roman's user avatar
  • 1
-1 votes
0 answers
21 views

How I can make the program wait for a seconds in PyQt5

When I trying to freeze the program in PyQt5, I try different ways for example QtCore.QTimer.singleShot and time.sleep, but both of them did not worded as I want. This is my program and I try to show ...
مهند علي's user avatar
0 votes
0 answers
29 views

Do I *Always* Need to Access GUI Elements from External Threads Using Signal/Slot in PyQt5?

While developing a Windows-based program using PyQt5, I encountered issues where the GUI was not updating in a timely manner due to long computation or wait times. To resolve this, I moved some ...
김정규's user avatar
0 votes
1 answer
44 views

How to deselect curve when clicking on background in pyqtgraph

I try to deselect a curve by clicking on the background in a pyqtgraph. So when I click on a curve, it is selecting it and when I click on the background or the curve again, it should deselect it. If ...
Souleater's user avatar
1 vote
3 answers
43 views

Prevent root items from being dropped onto another root item in PyQt5 QTreeView

I'm working on a PyQt5 application where I have a QTreeView populated with a QStandardItemModel. The root items present documents and the child sections within the document. So they should not be ...
Mazze's user avatar
  • 433
-1 votes
0 answers
26 views

I want a Combox not the right top corner inside a QGraphicsRectItem [duplicate]

I have a condition where I want a comboBox inside the Rectangle user drawings. For the user to select which sort of object it is. Below diagram should give you a better understanding This is my ...
Santhosh Dhaipule Chandrakanth's user avatar
-2 votes
0 answers
20 views

I want to view 3d images in PyQt5 but im unable to do that

QSocketNotifier: Can only be used with threads started with QThread Initializing UI Connecting to database Creating table Loading models Viewing CAD image for ID: 1 Displaying 3D image from path: ...
Ishan Ahire's user avatar
1 vote
1 answer
54 views

Creating a nuance-styled button with css in pyqt5

I came across a button style which I like, I wanted to recreate it for use in pyqt5, using the QPushButton class, and styling it with css. If I can recreate it, I can change it's colours in cool ways. ...
bfh47's user avatar
  • 13
1 vote
0 answers
41 views

PyQT5 VTK Mouse Button Event Mismatch

I am using PyQT5 and VTK for displaying information, and have been using observers to register mouse click events through the interactor style. For some reason, when multiple buttons are clicked, the ...
Adam's user avatar
  • 49
0 votes
1 answer
51 views

'Module {Module_Name} not installed' when running python script using PyQt5

I am trying to build a UI using PyQt5 and python. I built a base using main.qml and some styled qml files in the same directory and it imported fine, but I decided to break everything up into folders ...
Isaac M's user avatar
  • 84
0 votes
0 answers
22 views

How to connect a single NavigationToolbar to 2 Canvases (Matplotlib + PyQt5)

I am working on PyQt application that displays 2 FigureCanvasQTAgg inside of a QWidget. Currently, they are both linked to separate NavigationToolbar2QT objects but I would like to be able to control ...
dund3r's user avatar
  • 1
-1 votes
1 answer
51 views

How to margin text in Textedit with Stylesheet on Qt

I have a project that uses PyQt5 to create a GUI. I used StyleSheet to change the widget appearance. Everything is fine but there is only 1 thing It's not okay. It's about left and center margin of ...
Long96's user avatar
  • 39
0 votes
1 answer
44 views

Automatically expanding and contracting `QTextEdit` for PyQt5

I'm trying to create a custom QTextEdit widget in PyQt5 that automatically expands and contracts based on its content. The widget should grow in height as the user types new lines and shrink when ...
ExUltra's user avatar
0 votes
1 answer
77 views

Unable to execute batch file by Python program

I have a WORKING batch file that I want to execute by my Python program. here is the portion of program related to that task: def execute_batch_file(self): batch_file_path = r'C:\Users\UTENTE\...
Nico's user avatar
  • 3
0 votes
1 answer
17 views

PyQt5 with QSpliter and multi-level tabs

I'm struggling with proper layout of tabs in my GUI. As you can see, the QFrame in righthand side of splitter is not spanning the whole window - I suspect it is happening because it is not added to ...
zadisk8's user avatar
0 votes
0 answers
37 views

PyQt window for python-vlc not possible

I tried litarely every code I found on the internet to start a python-vlc player instance in a window frame made with PyQt but it's no working. The vlc player starts in a new window instead of taking ...
timtombobjohn's user avatar
0 votes
0 answers
9 views

How to disable js logging when using QWebEngineView [duplicate]

I am using QWebEngineView in my pyqt app. I am navigating to tradingview website and it is logging lots of errors continuously. This is making it difficult to find my logs in the mix. How can I stop ...
rsp's user avatar
  • 619
0 votes
0 answers
38 views

How to get the coordinates and/or the ID of a point on left mouse click in VTK PolyData in Python

I have a bunch of random points in a VTK renderer using QVTKRenderWindowInteractor. I can update the scene by generating more random points by clicking on the QT push button as seen in the screenshot. ...
OptimusPrime's user avatar
0 votes
0 answers
37 views

Can Python threads and queues be used to transfer data within in a PyQt5 QApplication? [duplicate]

My Use Case is: I have a Non-Blocking Python module that writes data to a file it uses threading.Thread to handle the Non-Blocking requirement it uses Queue.queue to handle protecting the data that ...
Daryl Kelvasa's user avatar
0 votes
0 answers
29 views

Applications packaged with nuitka cannot run

I am using Nuitka to package my PyQt5 application and running it in source code without any exceptions. But running after packaging will report an error: 📢 Tips: QFluentWidgets Pro is now released. ...
ChenMo's user avatar
  • 1
0 votes
0 answers
48 views

How do I know what a pyqtSignal will pass to a pyqtSlot?

I am going through the Qt doc page on Mode-View architecture and while trying to reproduce the usage of model indexes in PyQt5 I got to a working script that I don't fully understand. Here's the code: ...
curioso's user avatar
  • 155
-1 votes
1 answer
41 views

Python 3 - ModuleNotFoundError: No module named 'PyQt5' [closed]

I have installed pyQt5 using pip install pyqt5. However when I open my test code: import sys from PyQt5 import QtWidgets, QtCore It is coming up with the error message: Traceback (most recent ...
Jessica Fox's user avatar
1 vote
1 answer
74 views

Unable to alter the text color within a QTableWidget

I wrote a complex program that utilizes a PyQt6 table. I encountered an issue where I was unable to alter the font color within the table. To troubleshoot, I created a smaller program (see below) that ...
Menachem's user avatar
  • 297
0 votes
0 answers
43 views

Inaccurate Multiplanar Reconstruction (MPR) of CTs in My PyQt5 DICOM Viewer - Mild Horizontal Stretching

Question: I'm developing a DICOM viewer application using PyQt5 that includes multiplanar reconstruction (MPR) similar to OsiriX/Horos. However, I'm encountering an issue where the images appear ...
Miguel Nobre Menezes's user avatar
1 vote
0 answers
43 views

How to setup light source position and shading: with Pyqtgraph: GLMeshItem?

I am using pyqtgraph.opengl for graphics and display of STL files on my UI. I am using phong shading technique called 'shaded' param with pyqtgraph.opengl.GLMeshItem API. But I am having a dark color ...
Nagarjun Vinukonda's user avatar
0 votes
0 answers
24 views

Synchronize splashscreen and main program

I'm using this piece of script to get a splash screen followed by the main program. The splash screen works correctly: it shows the image for the set time after which it exits and the main screen ...
Ryan Day's user avatar
  • 125
0 votes
0 answers
57 views

Using pyenv python inplace of system default

I am on archlinux and trying to run krita scripter (built-in python console) with a pyenv python version. The system default python version is 3.12, however the script I am running uses python ...
Loma Harshana's user avatar
0 votes
0 answers
28 views

PyQt5 - How can I have scaling handles on the selected image [duplicate]

I'm trying to create a basic image viewer with just a few features. Can add/remove images Can move/drag images. Can rotate images Can scale images I don't know how to add control handles around a ...
Hashim's user avatar
  • 97
1 vote
1 answer
37 views

Why do the QGraphicsBlurEffect makes my QGraphicsView not work?

I am using the QGraphicsView widget on PyQt5 and I created some custom QGraphicsItems. When I instantiate without any effect my items, I get this : When I add those three lines : blur = ...
Kaki In's user avatar
  • 39
0 votes
0 answers
29 views

Whenever i changing the widget i am facing the issue of delay in overall performance and user interface while using serial COM

I'm using this PyQt5 code on the Raspberry Pi 4. When I run the code, I receive and plot analog values on the plot_widget via serial communication. If I change the mode or widget, and then attach the ...
Thiru .N's user avatar
0 votes
0 answers
38 views

How to dynamically compose QtCore.Qt.MatchgFlag(s) together rather than hard-coding them

I am trying to write a small app to control FastAPI server's configuration, using a dictionary. Due to the fact that I am using a QTreeView, and would like to create a search box for entering text ...
Hoang Duy Tran's user avatar
0 votes
0 answers
32 views

Making a non-rectangular button in PyQt5

I'm making a GUI using PyQt5 where I have hexagonal cells that have a button that is part of a circle at some vertex. However, I can't find a way to make the clickable area of the button be the arc, ...
Nedjma Kalliney's user avatar
0 votes
0 answers
32 views

How to change background-color of QPushButton in PyQtDarkTheme

I'm trying to change the background-color of my QPushButtons in PyQtDarkTheme, but it just doesn't work. My real project i'm working on. I've tried it like this, changing the text-color or ...
André's user avatar
  • 1
0 votes
0 answers
71 views

PyQt5 QWebEngineView Not Displaying Web Pages correctly

I'm attempting to create a simple web browser using PyQt5 on Termux Kali Linux rootless, and I've encountered an issue where the QWebEngineView doesn't display web pages as expected. I've followed the ...
Æmmy's user avatar
  • 21
0 votes
1 answer
34 views

printing output of subprocess.Popen in a pyQt5 Widget (realtime)

I checked every post regarding this issue and I found either very old posts (2011) or posts with solutions not working or fitting. My "only" wish is to bring the output of Popen to a ...
Stefan Bongers's user avatar
-3 votes
0 answers
12 views

Why is it not possible to use QGui instead of QWidget (I tried from QGIS and Spyder) in this case? [duplicate]

I want to use QtGui instead of QtWidget and I think it is not a deprecated module. opcion = QMessageBox.question(None, 'choose an option', 'Yes or No', QMessageBox.Yes, QMessageBox.No) if opcion == ...
user's user avatar
  • 303
-1 votes
0 answers
45 views

question regarding drawing squares on uploaded image

import sys from PyQt5.QtGui import QPixmap, QPainter, QPen, QColor, QImage from PyQt5.QtWidgets import ( QApplication, QWidget, QPushButton, QLabel, QVBoxLayout, QHBoxLayout, ...
Daniel Cho's user avatar
0 votes
1 answer
45 views

How do I change the font of label roles for the form layout in PyQt5? [duplicate]

I want all the text in a window I'm generating in PyQT5 to be courier. However, when I add rows to a form layout and add the label roles, these labels do not appear in courier. Here is my code: self....
dz1981-bit's user avatar
-1 votes
1 answer
49 views

Good practices on where to define the connection of custom Signals and Slots

When I emit a signal in script A and catch it script B to execute a slot there. Where should the mysignalA.connect(myslotB) go? In script A as: self.mysignalA.connect(B.myslotB) or in script B as: A....
Xenox's user avatar
  • 145

15 30 50 per page
1
2 3 4 5
297