I am new to Bitcoin and wanted to know if having an online wallet such as blockchain is better than having Bitcoin QT.
First some terminology.
Both blockchain.info and bitcoin-qt are "online" wallets. You have to be connected to the internet to use them. An offline wallet is one that is not connected to the internet, whether it is on a computer, a USB stick, or a piece of paper. Online wallets have all the security risks related to being connected to the internet, but are primarily susceptible to key loggers and trojans.
It is important to remember that "hosted" wallets, such as exchange wallets and coinbase, have the additional risk of losing your bitcoins as a result of the server going down or being hacked. I don't recommend keeping your bitcoins in someone else's wallet.
Blockchain.info is convenient because it can be accessed from anywhere and it is easy to use. Bitcoin-qt is not as easy to use, but it has some advantages.
Do not use a wallet that you cannot encrypt or that you cannot back up to another location.
Also, are there any exchanges where I can buy bitcoins thru credit card ?
It is easier to get a cash advance from your credit card and buy bitcoins with the cash advance than to buy bitcoins directly using a credit card.