basically he wants something like "apt-get upgrade libqt-*" which only selects installed "libqt-*". There are several ways to query those package names with dpkg and then you simply pass them to apt-get.