[Qt-interest] Newbie: how to shift focus to a tab widget

Stephen Jackson spjackson42 at gmail.com
Mon May 4 01:30:12 CEST 2009


On 03/05/09, john doe wrote:
>
> I want that when the button is clicked some computation is done and once
> finished the focus shifts to a text box showing the errors/output. I want
>

In the slot that handles the button's clicked() signal, you need some
code like this:

    tabWidget->setCurrentIndex(1); // change the page on the tabWidget
    textCtrl->setFocus();    // and set the focus to some widget on that page

> If anyone can point me to any tutorials/code it would be awesome.
>

    http://doc.trolltech.com/4.5/index.html

Regards,

Stephen Jackson



More information about the Qt-interest-old mailing list