pyside

Why does my log message not execute first?

Why does my log message not execute first? Question: Lately I have been working on building a GUI for my python script with PySide6 (Qt). I added a button that executes my script when pushed: def button_start_collecting(self): if not self.input_src.text(): self.log_message("Please add the missing source path") if not self.input_dest.text(): self.log_message("Please add the missing destination path") …

Total answers: 1

Qt Creator Design mode disabled for Qt Quick / PySide6 project

Qt Creator Design mode disabled for Qt Quick / PySide6 project Question: In newly installed Qt Creator 8.0.1, the Design Mode is disabled. I can only code in QML in Edit Mode. I can easily reproduce the problem by just creating a new Python Qt Quick Project as shown below. The Design Button on the …

Total answers: 1

How to plot hour:min time in ISO 8601 time format?

How to plot hour:min time in ISO 8601 time format? Question: I am trying to plot temperature data points according to their time recording. t = [‘2021-12-11T0:6:15’, ‘2021-12-11T7:15’, ‘2021-12-11T8:15’, ‘2021-12-11T9:15’, ‘2021-12-11T10:15’] temp = [33.6, 33.6, 33.6, 33.6, 33.6] Note: as you have mentioned t is represented without hour, the reason is that temp been collected …

Total answers: 1

PySide QListWidgetItem with Label wrap not shrinking

PySide QListWidgetItem with Label wrap not shrinking Question: I’m using pyside2 and python. I have a QListWidget with a custom widget being added to the listwidget. However for some reason when the main dialog is resized the listwidgetItems do not adjust their height to properly shrink to fit the available space, instead i have these …

Total answers: 1

Plot data by Qt Charts ( qml – QT Creator)

Plot data by Qt Charts ( qml – QT Creator) Question: I want to plot data in PySide/qml application (using QT Creator). I found a nice Qt Charts module url link but in components in Qt Creator can not be found. So I installed it manually like that: pip install PyQt6-Charts PyQt6 then I tried …

Total answers: 1

PySide6 – Qt Designer ui object has no attribute 'load_pages'

PySide6 – Qt Designer ui object has no attribute 'load_pages' Question: I’m trying to create a GUI with Qt Creator and PySide6. I got help from a friend, and the code works on his project, but when used in mine it doesn’t work, and I can’t figure out why. I can already tell it’s something …

Total answers: 1

PyInstaller problem making exe files that using transformers and PyQt5 library

PyInstaller problem making exe files that using transformers and PyQt5 library Question: So I’m working on an AI project using huggingface library, and I need to convert it into an exe file. I’m using PyQt5 for the interface, and transformers and datasets library from huggingface. I tried using PyInstaller to convert it into an exe …

Total answers: 2

Conflicting names between logging emit function and QT emit signal

Conflicting names between logging emit function and QT emit signal Question: I am trying to send a Qt signal every time the logging handler emit function is called. But I think MyLogHandler.emit and log.emit functions are conflicting. from PySide2.QtCore import QObject, Signal import logging class MyLogHandler(logging.Handler, QObject): log = Signal(str) def emit(self, record): self.log.emit(‘send’) if …

Total answers: 2

How to get selected text and start and end locations using PySide & QTextEdit?

How to get selected text and start and end locations using PySide & QTextEdit? Question: I’m able to display a QTextEdit widget and detect when the user changes the selected text. However, I’m unsure how to get the selected text and the integer values that represent the start and end locations of the selection measured …

Total answers: 2