Aah, i found the cause of the problem. I compiled the program with -pg option and used gprof to check which API was taking all the CPU time.
I found that it was QAbstractItemView::timerEvent(QTimerEvent * event). I wanted the contents of the table rows to scroll so i implemented a timer by subclassing QAbstractItemView::timerEvent(QTimerEvent * event) in my class. But due to this, the CPU usage goes high.
I think i'll use a normal QTimer instead of reimplementing QAbstractItemView::timerEvent(QTimerEvent * event).
Don't know why QAbstractItemView::timerEvent(QTimerEvent * event) is causing this problem though.
Bookmarks