Skip to content
Advertisement

Tag: pyside6

Pushing QWidget Window to topmost in Python

I’m new to Python and have mostly learnt C# in the past. I am creating a QWidget class: And then define a function that creates a QApplication and then the Window: My issue is getting the gif to show topmost when it is launched. There is a Topmost property you can set on a Winform in C# which means no

PySide6 TypeError when trying to open window for second time

I have two classes in PySide6. One is the main window and the second one is a widgetWindow. The main window is opening the widgetWindow with this function: The ConnectModbusWindow Class looks like this: I have no problem opening the ConnectModbusWindow for the first time. But when I try it for the second time i get the following error: TypeError:

how to do a pagination bar in PyQT?

I need to paginate data from SQL tables. I cant find any information about pagination in PyQT or Pyside. Can you help me pls? Answer One way to handle pagination is to use the QStackedWidget for emulating the pages themselves, and regular QLabels as the page links. Then you can override each labels mousePressEvent to emit a signal to the

QCombobox in a QDataWidgetMapper does not update model when using QSortFilterProxyModel on QSqlRelationalTableModel

I have a setup that uses a QTableView with a QSqlRelationalTableModel and a QDataWidgetMapper to edit the values of the active row in the table view: Everything works as expected when I set the QRelationalTableModel instance as the view’s model. But when I use the proxy model, as above, changes in comboboxes do not update the view. But they show

Using ListModel (Python/Pyside6) in QML

I have a ListView in QML and want to populate it with data from a AbstractListModel that I created in Python. AbtractListModel.py (I removed methods like rowCount() to keep the example lucid) Student.py ListView.qml How can I access name and age of a student in the delegate to show them where I used “#name” and “#age”? Answer At a minimum

python async with AsyncKernelManager and Qt not executing

I’m trying to execute code inside a jupyter kernel in a Qt application. I have the below snipplet that is supposed to asynchronously run the code and then print the result With the above I get the following output so trying to adjust the code according to an example from qasync to something like will result in the following exception

How to create .ts files for Qt Linguist with PySide6?

I have a python project written with PySide2 and now I want to migrate to PySide6. I used Qt Linguist to translate UI and created .ts files with help of this command: pylupdate5 utility from PyQt5 package (but it worked fine for my project with PySide2). Now I plan to get rid of PySide2 and PyQt5 packages. So, I need

Hover Tool for plots in Pyqtgraph

I want to have data information shown when hovering over a line in pyqtgraph plots, but can’t get my sigpointsHovered to emit any signal. Here is a simple example of what i tried to do: I have already tried setting “hoverable” = True and read the docs several times, but I honestly have no clue why the sigPointsHovered is not

Advertisement