Programming

Deleting items from a QListWidget in PyQt4

This morning I was working on my open source lyrics projection program, openlp.org, and I was struggling to work out how to remove an item from a QListWidget in PyQt4.

It's fairly simple in Qt4 and C++, you simply fetch the item, and then delete it using the C++ delete keyword:

QListWidgetItem item = ui->listWidget->currentItem();
delete item;

However, I couldn't figure out how to do it in Python. Initially I tried the del keyword, but that didn't work.

Raoul on UI design

I'm sure that most folks in the IT world have come across Joel Spolsky, and his blog, Joel on Software. Now Joel has some fantastic articles on recruitment, and I think he really knows his stuff when it comes to employment. However, every now and then he seems to have a delusions of grandeur and he thinks he's an expert on other things.

Rant: PHP5 is NOT object orientated AT ALL

I've finally had enough of PHP and its pathetic attempt at Object Orientation.

I've been trying my hand at writing an application framework. Yes, I know there are dozens out there, but I wanted to try my hand at it, and I had a specific project in mind to use it for. But in writing this framework, I've come up against PHP5's flawed implementation of OOP, and I have no idea how to get around it.