Implementation of quicktab by codes
I found the solution, As previously i was not using   'renderer'    =&gt; 'quicktabs', . Also 

 $tabs[] = array(
          'title' =&gt; t('Tab3'),
          'type' =&gt; 'freetext',
          'text' =&gt; 'Hello wecome to Tab3',
        );  


was not working.
Use this working function. 

function test_quicktabs(){



    $quicktabs_options = array(
        'style'   =&gt; 'Basic',
        'ajax'    =&gt; FALSE,
        'renderer'    =&gt; 'quicktabs',
    );

    $quicktabs_name = 'newinstance';

    $custom_tabs = array(
        array(
            'title' =&gt; 'Tab 1',
            'contents' =&gt; 'tab1',
            'weight' =&gt; -10
        ),
        array(
            'title' =&gt; 'Tab2',
            'contents' =&gt; 'tab2',
            'weight' =&gt; 0
        ));


   return  quicktabs_build_quicktabs($quicktabs_name, $quicktabs_options, $custom_tabs);

}


If anyone find better implementation using quicktabs hooks. Please do answer.