17,201 questions
2
votes
0
answers
29
views
How do I remove nested buttons from nested QHboxLayout in PyQt6? [duplicate]
I have a QVBoxLayout that contains three QLabels and a QHBoxLayout nested inside it. The nested QHboxLayout itself also has two nested buttons. When the buttons are pressed, I want to empty the entire ...
1
vote
0
answers
39
views
Extra "pyside" and "qt" in SRC_URI
I'm getting some strange behavior in my Yocto build of PySide6. I've cloned the meta-qt6 layer (release 6.8) and I want to install PySide6. I found that I was getting a bunch of do_fetch errors ...
1
vote
0
answers
48
views
QPalette.ColorRole.ButtonText not updating on hover and checked [duplicate]
In my paintEvent for QPushButton I am getting the current text color, whether the button is disabled, hovered, checked, or static. This works for disabled but when the button is hovered or checked, it'...
1
vote
1
answer
40
views
QListView drag and drop items (IconMode)
I have a QListView that is configured like this:
self.added_items_model = ReorderableModel(self.ui.lstViewAddedItems)
lstViewAddedItems = self.ui.lstViewAddedItems
lstViewAddedItems.setModel(self....
2
votes
0
answers
93
views
PyQt6 QWebEngineView 3D Plot Fail To Render With Large Data
I'm working on an antenna 3D polar plot program which need to render real-time plot.
Things I'm using:
Python 3.11.9
PyQt6 6.9.1
PyQt6-WebEngine-Qt6 6.9.2
plotly 6.3.1
Issue:
The code can generate ...
1
vote
0
answers
87
views
Unable to find module resources_rc, import resources_rc: How to generate import resource header to package name in PySide6
I'm trying to import my resource file but through my package. How do I generate the ui/resource files so that it can specify the package name. So that instead of this:
import resources_rc
it should ...
1
vote
0
answers
79
views
What is the syntax for adding non-rendered data/metadata to a .ui file?
I’m making an application where I’m converting a .xml to a .ui file (qtdesigner), and rendering that using pyqt.
However, there is some data in the .xml that I do not want to render (e.g. as metadata);...
1
vote
0
answers
58
views
pqyt6 - How to insert word-wrap in svg content
I'm creating pyqt6 app where I can replace normal fonts/text with svg fonts(.svg files like a.svg, b.svg etc).
My issue is with word-wrap. In normal mode(svg mode is disabled) QTextEdit correctly ...
1
vote
1
answer
57
views
Pybind11 cannot integrate with Qt 6.9.1
I included Qt 6.9.1 header files and pybind11/pybind11.h in a same file. but then I use python to build a package.(the compiler is MSVC2022 x64 and I only use CMake)
this is part of setup.py:
import ...
1
vote
1
answer
156
views
How do I change the color of the white select all cell on the top right corner? - PyQt5 QTableWidget [duplicate]
The white block on top right corner gets auto added whenever I insert a row.
It selects all rows and columns when I click on it just like in excel
I can see it makes space for S.nos; I've decided it'...
0
votes
1
answer
75
views
Load QPdfDocument outside of GUI thread for QPdfView?
In a pyside6 app, local pdf-files get displayed with QPdfView. The user can go through many pdfs within a second, and some of them take rather long to load and parse. Thus, loading the latest pdf in a ...
0
votes
1
answer
63
views
gradient background in pyqtgraph w/ pyqt6
Is it possible to give a gradient background to a plot in pyqtgraph & pyqt6?
Minimal code to start with:
import pyqtgraph as pg
from PyQt6.QtWidgets import QApplication
# Create application
app = ...
-1
votes
1
answer
71
views
QGraphicsScene.items() only returning items whose pos() exactly matches a test point, not items which contain the test point [closed]
A QGraphicsScene contains a number of MyItem items.
A MyItem is a QGraphicsItemGroup which contains, among other child items, a QGraphicsEllipseItem centred at the local origin.
A number of MyItem ...
0
votes
0
answers
86
views
I made an effect that can dissolve widgets with QMovie, but I can't find a way to only dissolve a single widget without affecting widgets behind it
How the dissolve looks like if you want to dissolve the entire window:
And if I apply it to a single widget like this:
self.test_label = QLabel()
self.test_label.setFixedSize(300, 300)...
0
votes
2
answers
75
views
Should I include build and dist folders in github, or just spec file? [closed]
I am using PyQt and Install Forge for an internal tool I am building for my current job, I cannot find any internal guides on whether I should be including my dist and build folders as generated by ...
1
vote
1
answer
83
views
Run function when leaving QTabWidget tab
I have multiple tabs that a user can switch between. I need a widget on a given tab to run an exit function when that tab is no longer selected. For example, if the user currently has tab_1 selected, ...
1
vote
0
answers
142
views
WebRTC Connection Failure between Next.js and QtPython Applications
I am developing two applications, a Next.js and a QtPython application. The goal is that the Next.js application will generate a WebRTC offer, post it to a Firebase document, and begin polling for an ...
0
votes
0
answers
51
views
Making a TableView item function like QComboBox instead of a QLineEdit in PyQT
I wrote a class that makes a window, part of this class is a function dynamic_table_view that creates a TableView widget with a possibility to view data and edit it right in that same window:
def ...
1
vote
1
answer
86
views
How do you change the position (column and row) of a PyQt QWidget inside a QTableWidget?
I want to move a QWidget from one position to another. I tried the following:
import sys
from PySide6.QtWidgets import (
QApplication, QMainWindow, QTableWidget, QLabel, QPushButton, QVBoxLayout, ...
2
votes
1
answer
110
views
Setting a persistent clipboard with multiple targets on X11
General overview
I am trying to set an image in clipboard into different linux’s targets. As example, depending of the context, the same image could be paste in png, jpg, or whatever else.
The problem
...
0
votes
1
answer
424
views
Pyside6 - Change svg icon color dynamically
I am trying to build a pyside6 application with a light mode and a dark mode. That means that my icons also need to be light and dark mode.
Now I was hoping to set the color of the QIcon SVGs inside ...
-1
votes
1
answer
64
views
QSqlQueryModel.setQuery() won't accept str [closed]
I'm trying to fill a QSQlQueryModel with data using setQuery and a specific database, but I get an error which to me looks like setQuery won't accept a string - despite that is what is described in ...
0
votes
2
answers
130
views
How can I change the white color in QComboBox?
I would like to change the color or adjust the size of this rectangle behind the open Combobox
I noticed that there is a problem with the increased size of this white background and the offset options ...
0
votes
1
answer
76
views
keyPressEvent on a vispy scene embedded in pyqt
I have a vispy scene embedded in a pyqt frame on a pyqt app to display some plots. Now, i need a keypressevent on the whole app for some unrelated thing (a home-made implementation of vim command mode)...
0
votes
0
answers
54
views
About animating the scale of a QDialog
I'm looking for ways to animate the scale of a QDialog to create a smooth animated popup.
Qt widgets don't have a scale property that you can animate, so I tried using a QGraphicsView() and wrapped a ...