Skip to main content

All Questions

Tagged with
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 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
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 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
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
3 votes
1 answer
57 views

MiterJoin is ignored for single-pixel width pen

Problem When drawing a rectangle with a line width of 1px on a QPainter with antialiasing enabled results in slightly transparent corners regardless of what JoinStyle is set. The same can be observed ...
J. Coenen's user avatar
  • 334
1 vote
2 answers
33 views

How can I set the focus to an invisible button or the window itself in a QDialog (PyQt5)?

I want to have a QDialog that blocks the interaction with the MainWindow, but where initially no widget has a focus, i. e. no button has a blue border and gets pushed when hitting "Enter". I ...
jon_tea's user avatar
  • 13
0 votes
0 answers
32 views

Pyuic5 generating file with syntax errors

Using Qt designer in order to create .ui file and then using pyuic5 to translate it to .py format yields file riddled with syntax errors because of "::" syntax. Command used: pyuic5 -x ...
Krzysztof Kulka's user avatar
0 votes
0 answers
57 views

PySide6 Menu Bar Actions Not Showing on macOS Sonoma 14.4.1 [duplicate]

I'm following a tutorial to create a PySide6 application with a menu bar, but I'm running into an issue on macOS Sonoma 14.4.1. The person doing the tutorial is using Windows OS, and everything works ...
Mahmoud Hosny's user avatar
0 votes
0 answers
117 views

How to print pdf file using QPrinter?

I can't print my pdf file using QPrinter, I figured it needs to be set to html to print it and now I'm getting this error on terminal: QPrintDialog: Cannot be used on non-native printers. And does ...
Les Jetskii's user avatar
1 vote
1 answer
45 views

PyQt5 How to add a pyuic5 generated Python class into QStackedWidget?

I've this in my app.py: from PyQt5 import QtWidgets from screens import Ui_home, Ui_login_page class MainWindow(QtWidgets.QMainWindow): def __init__(self): QtWidgets.QMainWindow.__init__(...
Ankit Tiwari's user avatar
  • 4,655
0 votes
1 answer
29 views

Can't have Designer to resize Qwidget inside QGridLayout in pyqt5? [duplicate]

I can run this code: import sys from PyQt5.QtWidgets import QApplication, QScrollArea, QWidget, QGridLayout, QVBoxLayout, QLabel from PyQt5 import QtGui, QtCore from PyQt5.QtGui import QDrag class ...
pippo1980's user avatar
  • 2,731
0 votes
1 answer
49 views

How to properly smooth a QPainterPath?

I am working on a Path drawing tool and made a previous post about how I could achieve smoother drawing. I have done some tinkering with cubicTo() and quadTo() but these have really not been much help....
Keller Hydle's user avatar
0 votes
0 answers
43 views

PyQt5 QTableView header with two lines of text, each with different font?

The minimal example code below renders the following GUI: What I would like to achieve, instead, is this (manually edited image): ... which is to say, I would like the column (horizontal) headings ...
sdbbs's user avatar
  • 5,121
0 votes
0 answers
31 views

Is there a tree structure for QT widgets which allows us to access them by relative relationship?

I am developing an application using PyQt, please see attached image. Besides the input field in the first row, I will generate more than 100 rows dynamically, each one having a large button (A1,A2,A3 ...
Ferex's user avatar
  • 575

15 30 50 per page
1
2 3 4 5
93