Subclasses of QListViewItems: Re: [Fwd: Re: [PyKDE] Typecasting]

Coy Krill ckrill at qvlinc.com
Wed Nov 15 23:16:43 GMT 2000


If you look at your program with less, you will see that you have some 
strange hex character 0xA0 in your code. less shows it as <A0>, vi makes it 
look like a space and in vim it looks like "| ". Not sure where they came 
from but the code seems to work once they are removed.

Coy

> > I've been experimenting with QListView - and I don't really understand my
> findings. If you look at the attached code, you see that the same signal
> fits one function, but not the other, even though they have the same
> number of arguments.
>
> Actually, all commented out connections gave an error like:
>
> Traceback (most recent call last):
>   File "qlsv_sig.py", line 77, in ?
>     main()
>   File "qlsv_sig.py", line 71, in main
>     toplevel=frmListView()
>   File "qlsv_sig.py", line 39, in __init__
>     self.connect(self, SIGNAL("onItem(QListViewItem*)"), self.slotOneArg)
> RuntimeError: Signal has wrong argument types for slot
>
> And when I arrived at ...SIGNAL("mouseButtonClicked")... (line 53), I got
> another error as well:
>
> bash-2.03$ python qlsv_sig.py
> QObject::connect: No such signal QObject::onViewport()
> QObject::connect:  (sender name:   'unnamed')
> QObject::connect:  (receiver name: 'unnamed')
> QObject::connect: No such signal QObject::selectionChanged()
> QObject::connect:  (sender name:   'unnamed')
> QObject::connect:  (receiver name: 'unnamed')
> Traceback (most recent call last):
>   File "qlsv_sig.py", line 83, in ?
>     main()
>   File "qlsv_sig.py", line 77, in main
>     toplevel=frmListView()
>   File "qlsv_sig.py", line 53, in __init__
>     self.connect(self, SIGNAL("mouseButtonClicked(int, QListViewItem*,
> constQPoint&, int)"), self.slotFourArg)
> RuntimeError: Signal has wrong argument types for slot
>
> I'm using Qt 2.2.2, PyQt 2.2 and Python 2.0.

----------------------------------------
Content-Type: TEXT/PLAIN; charset="X-UNKNOWN"; name="qlsv_sig.py"
Content-Transfer-Encoding: BASE64
Content-Description: 
----------------------------------------




More information about the PyQt mailing list