I was never sure why it was happening, but when it did I handled it this way. Right click the question mark icon....left click the word icon setting. This will open up a box, and in the left hand corner of that box will be the question mark icon . Left clicking that will open a menu of icons for applications. Usually you can find the icon that corresponds to the application, or you can use the drop down menu to add to your choices. In some instances by clicking other icons setting will give you the choice you need. If you can't find what you want, I have used a substitute of my liking.
P.S. The above is used for KDE4, in KDE3 just double click on the question mark and change the icon in the same manner.