I've never used kmail, but far as I know, it can use SMTP and POP to send and receive mail, and if so would be compatible with qmail.
qmail has an SMTP and POP servers... it's a complete MTA. Which means, it can send & receive mail and deliver it to mailboxes if it's for a local address. You should then be able to read the mail in a mailbox with kmail, or send some via SMTP.
If you have a running qmail server, kmail should be able to use it as POP and SMTP server. If this doesn't answer the question, please tell us more about what the qmail server is doing already. You don't seem to be asking how to configure that.