I’m new to python. I designed a GUI in QtDesigner and translated the code to use it with python. Since if I change something in the GUI it will overwrite my code I want to use a separate file for the functions. The code should run after the main window is shown but I get ..
I am using PySide6 to build a desktop application and I have found myself with three different widget signals connecting to the same slot: self.ui.search_line_edit.returnPressed.connect(self.search) self.ui.search_button.clicked.connect(self.search) self.ui.search_history_table.itemDoubleClicked.connect(self.search) I could use a loop like below: search_widgets_signals = [self.ui.search_line_edit.returnPressed, self.ui.search_button.clicked, self.ui.search_history_table.itemDoubleClicked] for search_widget_signal in search_widgets_signals: search_widget_signal.connect(self.search) Is there a better way to do this ? Source: Python ..
I am experiencing a strange problem with QObject().receivers method. import sys from PySide2.QtWidgets import QApplication, QMessageBox, QWidget from PySide2.QtCore import Slot, Signal, SIGNAL if __name__ == "__main__": app = QApplication(sys.argv) widget = QWidget() signal = Signal() print(widget.receivers(signal)) sys.exit(app.exec_()) It works under PyQt5, but fails under PySide2 with the following error: TypeError: ‘PySide2.QtCore.QObject.receivers’ called with wrong ..
enter image description here I installed pyside on python version 3.4 but I needed to change to a newer version I changed to 3.6 and it gave me the same error and now I am working on version 3.9 all are 32 bit. Help me please Source: Python..
Scroll is not working after selecting an item on a treeview. Before selecting an item scroll is working. I think I have missed some property or I have wrongly configured the widget. I’m using QT designer to draw an UI file and using PYQT package to read the UI file. Please suggest me what should ..
Scroll is not working while left clicking on an item on a treeview. Before selecting an item scroll is working. I think I have missed some property or I have wrongly configured the widget. I’m using QT designer to draw an UI file and using PYQT package to read the UI file. Please suggest me ..
I know there is nearly the same question posted, but I don’t get it how to display an image in QML, which gets loaded from python in byte format and emitted with a signal. I would really be thankful for any help! Source: Python..
# -*- coding: utf-8 -*- from PySide6.QtWidgets import * from PySide6.QtCore import * from PySide6.QtGui import * from loginWindow import Ui_LoginWindow from mainWindow import Ui_MainWindow import sys class LoginWindow(QMainWindow, Ui_LoginWindow): def __init__(self, *args, obj=None, **kwargs): super(LoginWindow, self).__init__(*args, **kwargs) self.setupUi(self) self.setWindowFlags(Qt.FramelessWindowHint) self.pushButton_userLogin.clicked.connect(self.userLogin) def userLogin(self): self.hide() # mainWindow UI Load app = QApplication() window = LoginWindow() window.show() ..
I am developing an app that uses QML and PySide2. I am trying to open a file dialog when a button is pushed, but I keep getting the following exception that I dont really understand: FIXME Subscripted generics cannot be used with class and instance checks Traceback (most recent call last): File "/home/chris/Documents/Programming/Synchrony/Desktop/gui.py", line 47, ..
I’m building a small image annotation app, but encountered some issues. In short, this app allows the user to free-hand-draw aliased pixel mask on an image. For this, I create a – QGraphicsView |– QGraphicsScene # for drawing the overlaid mask |– QGraphicsPixmapItem # for the underlying image And I detect mousePressEvent, mouseMoveEvent, and mouseReleaseEvent ..