[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: argument errors withQComboBox.currentTextChanged signal
From: David Boddie <david () boddie ! org ! uk>
Date: 2021-07-13 0:25:34
Message-ID: 4076368.bIViPN4yDW () aurora
[Download RAW message or body]
On Mon Jul 12 18:43:59 BST 2021, Axel Rau wrote:
> Attached is the complete module.
> With this variant, I get
> QObject::connect: Cannot connect QComboBox::currentTextChanged(QString) to
> (nullptr)::zoneBoxSelectionChanged(QString)
Do you need to call the ZoneView class's super() method in its __init__()
method? Traditionally, all classes derived from QObject needed to do this in
order to use the meta-object system.
Also, I haven't looked at type annotations in Python but do you need the
str annotation on zone_name here?
@QtCore.pyqtSlot(str)
def zoneBoxSelectionChanged(self, zone_name: str):
if zone_name:
self.reload_table(zone_name)
The pyqtSlot decorator will take care of any type handling.
David
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic