[Kde-perl] Cannot handle 'const QStrList*' as argument to QListBox

Ashley Winters jahqueel at yahoo.com
Sat Mar 13 09:14:29 CET 2004


--- Jake Hawkes <jake at infinitylimited.net> wrote:
> this works for me too.  Chances are I'm passing in the wrong arg.  

> $listbox->insertStrList(\playlist, 0);

Oh hell, this is ambiguous. For some reason, on my PerlQt, that comes
out to be, with -MQt::debug=calls

$lb->insertStrList([qw(foo bar baz)]);
** Calling method  void QListBox::insertStrList(const char**)

$lb->insertStrList([qw(foo bar baz)], 1);
** Calling method  void QListBox::insertStrList(const char**, int)

$lb->insertStrList([qw(foo bar baz)], 1, 1);
** Calling method  void QListBox::insertStrList(const char**, int, int)

None of these, I presume, is what you want. Anyways, insertStrList() is
deprecated. In the famous words of someone: Don't Do That.

Use insertStringList() instead, like so:

$lb->insertStringList([playlist], 0);

Note: I would probably have your getPlaylist function thing return an
array ref to begin with; attributes can't really return working arrays.
In which case, you end up with:

$lb->insertStringList(playlist, 0);

Ashley Winters

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com


More information about the Kde-perl mailing list