Ibn al-Qasim died in Eqypt in 191 AH.
After his death Ibn al-Qasim was seen in a dream and asked about the good he encountered. He was asked, “For what reason?” He said, “On account of some raka’ats I prayed in Alexandria.” He was asked, “For fiqh questions?”, “No,” he answered, gesturing with his hand, meaning: “We found it to be dust.” 
The author said, “Let no one think that being occupied with knowledge is nothing and that there is only being occupied with worship. Being occupied with knowledge is a sort of worship, indeed, it is the most esteemed [worship] because human souls vary in their occupations. Some of them are strongly affected by one occupation and some of them are affected by another. The effect of that will appear in the World of Interspace. All occupations are praiseworthy in themselves; sometimes a man will be successful in some minor simple actions because of a righteous intention, which does not occur in many major actions. ‘Allah does not look at your forms, but He looks at your hearts and intentions.’  This is a basic principle in the din, so understand.” 
 Qadi ‘Iyad, Tartib al-madarik, 1:434.
 How excellent is what Ibn ‘Abd al-Barr transmitted! ‘Abdallah al-‘Umari, the devotee, wrote to Malik to encourage isolation and action. Malik wrote to him: “Allah has divided actions as He has divided provisions. Many a man is given openings in prayer, but not in fasting, while another is given an opening in jihad. So knowledge spreads from the best actions of taqwa. I am satisfied with that in which He has given me an opening, and I do not think that I am doing less than what you are doing. I hope that each of us will remain in blessing and good. (Siyar a’lam an-nubula’. 8:114.)
 Muslim transmitted it in his Sahih, in the Book of Piety, Maintaining Ties of Kinship and Adab, in the chapter on the prohibition of wronging a Muslim from Abu Hurayrah, may Allah be pleased with him, who said, “The Messenger of Allah, may Allah bless him and grant him peace, said, ‘Allah does not look at your bodies nor your forms, but He looks at your hearts.'”
(The Garden of the Hadith Scholars, Imam ‘Abd al-‘Aziz ad-Dihlawi)