All Questions
308
questions
0
votes
0
answers
21
views
Customize QLineEdit
I want to modify QCompleter's default Behaviour of updating suggestions into Qlineedit, I want instead of updating it on Qlineedit it passes that value to a function and then removes all special ...
0
votes
0
answers
52
views
Python Qt (PySide2) window.findChild() ran in loop overwriting reference [duplicate]
So I have a a set of 8 LineEdits and 8 Checkboxes as the following image. I'm trying to save some code and connect each check to enable/disable its corresponding line.
image
It behaves fine if I set ...
1
vote
1
answer
167
views
how to implement hover effect on a QTableView row
import sys
from PySide2.QtGui import QColor, QBrush
from PySide2.QtWidgets import QStyledItemDelegate, QApplication, QTableView, QAbstractItemView, QStyle
from PySide2.QtCore import Qt, QModelIndex, ...
0
votes
0
answers
62
views
Cannot grab LeftMouseButtonGesture when called by a signal
I've list of items and I need to view detailed information of the item when clicked on it. Since the number of items and their details are huge, I need to be able scroll them with left mouse button (...
0
votes
1
answer
133
views
QPrintPreviewWidget freezes the application when the horizontal scrollbar is shown
I am having a bug with QPrintPreviewWidget (PySide2 5.15.2.1, Windows 11). From the moment I made this post, I didn't found anything related online.
When I force the horizontal scrollbar to appear ...
4
votes
2
answers
180
views
Performing bidirectional signals in QThreads
I've been wondering over the question: is there are correct (or standard) way to create QThreads, which make of use of bidirectional signals?
That is, QThreads capable of processing not only custom ...
0
votes
1
answer
72
views
QMenu.setTearOffEnabled window doesn't correctly size itself to display a QWidgetAction
QMenu correctly displays a QWidgetAction that contains a QWidget with its own dimensions, but when the menu is torn off (and becomes an independent window) things go wrong. The window is sized to ...
0
votes
1
answer
102
views
Weird PySide2 QPushButton background colour when checked
I can use a stylesheet to set the background colour of a QPushButton when it is clicked or checked. The checked colours are however not as I've set them; they include some raster pattern.
The code I ...
0
votes
1
answer
57
views
How to reposition custom QHeaderview when QTableWidget is scrolled horizontally
I am using a custom header based on QHeaderView to create column labels that span multiple columns. The column labels are themselves QLabel objects. I can correctly resize the column labels when a ...
0
votes
0
answers
30
views
Problem with getting data from QTableWidget via iteration [duplicate]
I'm using PySide2/PyQt5 to create a QTableWidget as shown in the code below. I'm using a QItemDelegate to restrict the input of certain columns to integer only. If I set cell 0,0 to say 3, then in the ...
0
votes
0
answers
239
views
PySide2: qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found
I just installed PySide2 with pip in my base environment and, when I tried to run an application, I got the following error:
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in ...
0
votes
0
answers
49
views
Smoother slider movement in scrollbar pyqt
In my code, when one button is clicked, the slider (it is in QScrollArea) is automatically shifted with setSliderPosition(new position). But it happens very quickly and it makes your eyes ...
1
vote
0
answers
19
views
QListWidget's Drag and drop removes the content of the dragged row when dropped in the same place [duplicate]
when I drag a row to place it in the same place somehow this causes a bug to happen and remove content of this dragged row! is there any fix to keep the data of this dragged row.
I try to drag first ...
0
votes
1
answer
295
views
Is it safe to assume that using a QEventLoop is a correct way of creating qt5-compatible coroutines in python?
I'm using a custom QEventLoop instance in my code to simulate the QDialog.exec_() function. That is, the ability to pause the python script at some point without freezing the GUI, and then, at some ...
1
vote
0
answers
107
views
How does vtk implement actor refresh in the scene
In one of my recent projects that required the use of VTK, I wanted to implement a feature where I could move two balls around in a vtk scene while using the mouse to move the view. I generated a code ...