Questions tagged [pyside]

Questions about using PySide, a Python Qt bindings project.

Filter by
Sorted by
Tagged with
-3 votes
0 answers
47 views

How to configure/implement a VS Code Extension (Qt for Python) [closed]

I am currently working on a Python/QML Project using VS-Code. I installed a few extensions for syntax highlighting and more for QML. There are a few modules that are not on my computer, but the ...
Jawen H'gar's user avatar
0 votes
1 answer
44 views

How to return json object with QHttpServer

I am trying to create a simple rest api with QHttpServer in Python. I had checked examples in C++. However, I couldn't get it to work in Python. When callback_api returns a string, it is visible as ...
Reactionic's user avatar
0 votes
1 answer
32 views

Continous Update of Python Qt Plot

Consider the sample PySide6 code below. I have a class SampleWindow which generates some set of values continuously (x and y). I would also like to plot and visualize them parallelly, for which ...
StanGeo's user avatar
  • 429
0 votes
0 answers
38 views

convert QImage to QVideoFrame in PySide6

I'm having trouble porting my application to PySide6 from PySide2. I'm reading my camera with the gphoto2 library and created a PIL Image from it in preview mode. It's like a live viewfinder, showing ...
christianPro's user avatar
-1 votes
0 answers
41 views

How to provide application wide variables in a QT application?

I am developing an application with PySide6. Hereafter is a minimum example illustrating my question. The main point is the self.my_list list in the main application. In the real application I have ...
Ger's user avatar
  • 9,152
0 votes
0 answers
34 views

Do i really need to use Layouts in PyQt? [closed]

I have a large project—a Windows-like OS designed for low-power devices, such as tablets in the kitchen, for basic web browsing and simple tasks. It's essentially a clean and simple OS, although it's ...
Etscharntmin's user avatar
0 votes
0 answers
42 views

Component.onCompleted does not call function in pyside6 python

I have this element in my qml file // main.qml Canvas { id: cnvv objectName: "cnvv" width: parent.width - setting.width height: parent.height Component.onCompleted: { ...
Magikman008's user avatar
0 votes
2 answers
46 views

No connection between qml and python in pyside6

I was writing a large program and encountered strange errors. Wandering around Google, I came to a simple program that does not perform the expected functionality. When you press a button, the number ...
Magikman008's user avatar
-3 votes
1 answer
53 views

vscode python pyside6 [closed]

I have virtualenv with Python3.11 and Pyside 6.5.2 I can launch my application without any problem but when I click on a certain button, I get the following error Failed to enable GUI event loop ...
jeyzorus's user avatar
1 vote
0 answers
26 views

Why did it successfully set up a modal?

An attempt was made to output a dialog containing the image when a thread signal occurred. NonModal was not applied when setWindowModality was set, but when I changed the code as follows, NonModal was ...
heehee100's user avatar
0 votes
2 answers
34 views

PySide6/PyQt6 movable QGraphicsTextItem malfunction when changing it's angle - spiraling around cursor when QGraphicsTextItem angle is above 60

I want to create a GUI application that is able to put watermark on a photo and save it - I want to be able to move this watermark by pressing, holding and moving around the cursor, I also need to be ...
Jakub Szatkowski's user avatar
0 votes
0 answers
37 views

How to implement a Qt MVC proxy model to re-arrange item/indices in a tree view?

How to implement a Qt MVC proxy model to re-arrange item/indices in a tree view ? Hi, I believe to have a fundamental Qt MVC question about proxy models. And I am struggling to get a working ...
sogrady's user avatar
0 votes
0 answers
15 views

How to update widgets in mainwindow when database is updated

I have an application that can interact with its database by adding, deleting or updating its entries. What I xant to do is that whenever there is a new entry or an operation is performed on the ...
Skepta's user avatar
  • 19
0 votes
0 answers
20 views

How do I get an index from items in a grid layout? [duplicate]

I know that my question is quite weird but here is the code that I have come up with: import sys from PySide6.QtWidgets import (QMainWindow, QWidget, QDialog, QGridLayout, ...
Skepta's user avatar
  • 19
-2 votes
0 answers
34 views

QMenu error: 'ExitMenuClassWindow' Invisible

I an making a text editor and I want to create a QMenu in the QMenuBar which when pressed the windows are closed but I am getting the following message: "QWindowsWindow::setMouseGrabEnabled: Not ...
Luiz Fernando Schmitt Filho's user avatar
0 votes
1 answer
25 views

PySide6 - Color specific row with QTableView QAbstractTableModel and Pandas

This is the first application I have created with Python QT so apologies if I have missed something really fundamental. The following table is populated via a QAbstractTableModel linked to a Pandas ...
Byte Insight's user avatar
0 votes
1 answer
36 views

Qt multiple widget in QHeader of TreeWidget

I want to add multiple buttons and a label inside the header of a tree widget. This is what I want : wireframe. This is what I tried so far : from PySide2 import QtWidgets, QtCore import sys class ...
isaac's user avatar
  • 3
0 votes
0 answers
15 views

AttributeError when trying to access 'MediaAudioCapture' on PySide6.QtWebEngineWidgets.QWebEngineView

I'm encountering an issue when trying to access the 'MediaAudioCapture' property on PySide6.QtWebEngineWidgets.QWebEngineView. The specific error I'm receiving is as follows: AttributeError: type ...
Rafael Ruscher's user avatar
0 votes
2 answers
32 views

Mirror Selected QGraphicsItems based on boundingRect center

For the life of me I can not seem to figure out how to mirror the selected QGraphicsItems based on their selected center? Each attempt I've tried makes the items eventually shoot off screen. I've ...
JokerMartini's user avatar
  • 5,788
1 vote
0 answers
17 views

PySide6, QTreeWidget, showing full column text as tooltip if and only if the column text is truncated

I created a simple table with QTreeWidget. When a column's text is too long for the column width, it gets truncated with ellipses. Can I show the full text when the user hovers the mouse over the ...
Damn Vegetables's user avatar
0 votes
0 answers
37 views

Pyside2/6 QColumnView seems broken, same model works on QTreeView

I'm developing an application that involves displaying a hierarchical structure of entities. These entities are stored in a large database that cannot be fetched in its entirety, so I'm implementing ...
Radek Wysocki's user avatar
0 votes
0 answers
43 views

Correct way to use multiple inheritance with Qt (pysyde6)

I'm trying to use multiple inheritance with my and Qt-derived classes. But faced with the fact that the __init__() method from my class is not called when I use super() to call __init__() for base ...
GrAnd's user avatar
  • 10.2k
0 votes
1 answer
34 views

PySide6 updating GUI text from a loop in a thread

What I am trying to do is creating a separate thread from the GUI, and then in a loop, update the GUI text in every 0.01 second. I came up with the following code by searching the web, but it seems ...
Damn Vegetables's user avatar
0 votes
0 answers
35 views

Is it possible to create a Qt/C++ app which hosts some widgets provided through a pyqt/pyside script?

I am working on a C++/Qt5 project. There are some reasons that I have to build the framework with native C++/Qt instead of PyQt/PySide.However, I also want the app to have the ability to load UI and ...
Wesley Ranger's user avatar
0 votes
0 answers
16 views

Pyside2: Tab is not "properly" highlighted, when starting application

I have a Tab widget in my application. When I start the application the starting tab is always grey, rather than blue. Only when I click on the tab I will start to be blue. I want the tab to be blue ...
Janosch's user avatar
  • 398
0 votes
1 answer
116 views

In PySide6, show() method for QSystemIconTrayIcon() not working after calling hide() function

My app needs to dynamically show or hide system tray. But once I call .hide() function on it, and then call .show() on it, It does not show up. Same behavior with .setVisible(...). Minimal ...
Ecto Ruseff's user avatar
0 votes
1 answer
38 views

Creating QWidget class and inserting it in an QFormLayout looses alignment

I want a simple widget which contains a QLineEdit, a QPushButton and a second QLineEdit to enter a directory and file name. I started by defining everything within the same QWidget, named ...
Mathieu's user avatar
  • 5,414
0 votes
0 answers
25 views

PyQt5: A custom subclass of QWidget cannot fill entire window, but QWidget() can, what's the difference? [duplicate]

class customWidget(QWidget): def init(self, parent=None): super(customWidget, self).init(parent) class Window1(QWidget): def init(self): super(Window1, self).init() self.setFixedSize(800, 600) self....
沈洋洋's user avatar
0 votes
1 answer
45 views

make start block line point from right

lines = [ "اهلا", "كيف حالك", "السطر الاول من الملف النصي", "السطر الثاني من الملف النصي", "السطر الثالث من الملف النصي", &...
CofeKeys's user avatar
0 votes
1 answer
48 views

Pyside6 - How do I add a stylesheet to a toolbar button when using QAction?

How do I change the color of the tooltip message? The stylesheet is not recognized. This Python class draws a toolbar and adds itself to the parent window def __init__(self, parent): super()....
Raven's user avatar
  • 133
-1 votes
1 answer
54 views

PySide or PyQT: using signals and slots to update GUI QLabel during QThread process

I am running a long process with QThread. In this process I send a signal to a slot. I want that slot to update a QLabel with setText(). I have ensured that my QThread process is on a separate thread ...
sickysickybrah's user avatar
0 votes
0 answers
14 views

QGraphicsPixmapItem setRotation not redrawing after rotation

I have a QGraphicsPixmapItem that I want to rotate. If I use a button on the GUI to set the rotation, it rotates fine and is redrawn fine. If I have a separate thread execute the same command (...
dreed75's user avatar
  • 115
0 votes
1 answer
34 views

How to reconstruct the local coordinate system of a sized QGraphicsItem of QT?

I am new to Qt. I encountered a problem when resizing the QGraphicsItem. It has not been solved after a week. The code refered the issue Resize a QGraphicsItem with the mouse, but when I resized the ...
swgchlry's user avatar
0 votes
1 answer
54 views

Unable to keep searching on QplainTextEdit while Qdialog is open

I am trying to replicate default Notepad find operation.Notepad Find Functionality But in my case the QDialog is getting closed after the first operation. Can somebody please help me in keeping the ...
Sayan's user avatar
  • 3
0 votes
0 answers
4k views

Show Y values inside/above the BarGraphItem itself

I have the following code: from PyQt5.QtWidgets import * import pyqtgraph as pg import sys class Window(QMainWindow): def __init__(self): super().__init__() self.setGeometry(100, ...
William Brochensque junior's user avatar
0 votes
1 answer
77 views

Can I call a QObject method from main thread after moveToThread() method is called?

I have a worker class class Worker(QObject): finished = Signal() def __init__(self, n): super().__init__() self.a_flag = False # self.mutex = QMutex() # @Slot() ...
haccks's user avatar
  • 104k
3 votes
0 answers
54 views

PySide2, Threading and Images

I have a simple code that gradually loads a large number of images while the UI remains responsive. This works OK on PySide6, PyQt5 and PyQt6, but on PySide2 the interface lags and the images appear ...
Nordicheskiy's user avatar
0 votes
1 answer
31 views

Can I make a QStandardItem editable from one view but not the other?

Consider the snippet below that creates two item models and views for a single item: item = QStandardItem("my item") item_model_1 = QStandardItemModel() item_model_1.appendRow(item) ...
DJames's user avatar
  • 591
2 votes
1 answer
135 views

Pyside6, how to constrain layout width from its content?

I'm trying to create a widget containing 4 labels displaying text, and one label displaying an image. Main layout is a QVBoxLayout containing : a QHBoxLayout with the two text label the Label for the ...
Salmon Loving Bear's user avatar
0 votes
0 answers
26 views

Have movable image in PyQt/PySide that wraps one edge to the other edge when moved (similar an interactive map)

I have a CSV colormap image and want it to be able to move horizontally and (similar to an interactive world map like google maps) have one side wrap back to the other side when moved, like so: [...
Isaac Bandstra's user avatar
0 votes
0 answers
54 views

PySide6: OAuth2 with Google

I tried to create an OAuth2 application similar to the one presented here. The part related to modify_parameters function I took from here. The code: import sys from PySide6.QtWidgets import ...
kharandziuk's user avatar
  • 12.2k
0 votes
0 answers
43 views

Getting PySide2 QTabWidget to look more like Maya’s native version

anyone know how to get rid of the thin line under all the tabs in a QTabWidget so it can be more like a maya native bit of UI? I tried a stylesheet of ("QTabWidget::pane {border: 0px solid #...
Aron Durkin's user avatar
0 votes
0 answers
52 views

Prevent QChart PlotArea shifting after axis labels values changes

When you zoom the plot, axis values labels changes and increase their length like: 5.0->5.01->5.001->5.0001 etc. This cause next behaviour: Vertical axis shifts in horizontal direction every ...
Mika's user avatar
  • 53
0 votes
0 answers
149 views

What is replacement of QVariant in PySide6?

As doc said, QVariant is removed in python. However, in some case, I still need QVariant. class TreeNode(QObject): dataChanged = Signal(object, int) # here def __init__(self, parent = None): ...
Kamichanw's user avatar
0 votes
0 answers
23 views

How to call a method in the __init__ method of a class in order to make a QPushButton custom widget

Here is the basic code: import sys from PySide6.QtWidgets import QApplication from PySide6.QtWidgets import QPushButton, QLabel, QHBoxLayout from PySide6.QtGui import QPixmap class CategoryButton(...
averagejoe's user avatar
1 vote
1 answer
47 views

Tab size of QTabBar in QMdiArea

My QMainWindow is using QMdiArea. The viewMode of the QMdiArea is set to TabbedView. The Tab size of MdiArea takes entire width of the MdiArea: If more tabs are added, they divide MdiArea width and ...
Ajay's user avatar
  • 354
0 votes
0 answers
146 views

Qt: LLVM ERROR: 64-bit code requested on a subtarget that doesn't support it

When using QWebEngineView, I get a crash "LLVM ERROR: 64-bit code requested on a subtarget that doesn't support it!" and the app closes. I installed Python 3.10 and PySide2==5.15.2.1 through ...
MiaPlan.de's user avatar
0 votes
0 answers
11 views

Draggable Frameless Window - PyQt6 [duplicate]

I've build a simple app layout with QtDesigner pyside6-designer Then i saved the .ui file and converted to python code: pyuic6 -x simpleApp.ui -o simpleApp.py At this point i decided to make the ...
Bruce Ecurb's user avatar
1 vote
1 answer
44 views

Missing classes in PySide2

I just upgraded the Python version (Ubuntu, miniconda3, pip) from 3.9 to 3.11 and found that the classes QRegularExpressionValidator and QDeadlineTimer are missing from PySide2 now. Have they been ...
MiaPlan.de's user avatar
0 votes
0 answers
30 views

Pycharm cant find pyside libs installed by brew

I have [email protected] and pyside2 installed using brew. I create virtual env: create env python3.10 -m venv env activate it with source env/bin/activate check python version python -version and i get ...
slawalata's user avatar
  • 399

1
2 3 4 5
72