Qt World Summit: Register Today!

Which Signal to use for QTabwidget ?

  • Hi,
    I'm new to UI development.So, apologize for the inconvience.

    I'v Qt-plugin for VS2010. So, using the QT designer I've developed a Tab window. This tab have got some fields with parameters(QTaableWidget) . So, my requirement is to fill the parameters when a user click the tab. I've made a function which contains those values and I assume like when the user select the tab the signal associated for the "Tab select" will call my function which is a slot and thus fills the parameters.

    Can I do that or is there anything which I should do.Need suggestion.

  • So, you are using "QTabWidget":http://doc.qt.nokia.com/latest/qtabwidget.html right ? , That emits "this":http://doc.qt.nokia.com/latest/qtabwidget.html#currentChanged signal :)

  • HI, tanx for the quick reply.

    yes, From the deisgner what I've noticed I'm writing based on that. From the Qt designer I first created a Main tabWidget(class:QTabWidget), within that I created 2 tabs (class:QWidget ) and under each tabs I again created tablewidget(class:QTableWidget). So, the tableWidget contains some feild parameters which I need to basically fill it.

    So,"currentChanged()" signal will be invoked when I do a select on any tab[2 tabs created ] created under Main tabWidget.

    Once I test this I'll come back.

  • I don't think if currentChanged() is emitted if an already selected tab is clicked! Otherwise, this works fine.

Log in to reply