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

Jake Hawkes jake at infinitylimited.net
Sat Mar 13 08:03:46 CET 2004


use Qt::attributes qw(
	slim
	playlist
);

	slim = SlimApp->new();

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


SlimApp::getPlayList {
	
	($junk, $junk, $junk, $index) = 
		getFromPlayer($session, "$playerAddress playlist index ?");
	
	for($i=$index+1;$i<=10;$i++) {
		($junk, $junk, $junk, $list_index, $list_title) =
			getFromPlayer($session, "$playerAddress playlist title $i ?");
		push(@titles, $list_index ." - ".$list_title);
	}
	return @titles;	
}


I run this, and I get:
Cannot handle 'const QStrList*' as argument to QListBox::insertStrList 
at /usr/lib/perl5/site_perl/5.8.0/i686-linux/Qt.pm line 445,

I'm trying to pass in a list of strings into the listBox.


According to TrollTech:
void QListBox::insertStringList ( const QStringList & list, int index = -1 )


More information about the Kde-perl mailing list