mandarinka
23rd February 2011, 16:09
Hello.
I have an Application with two Tabs:
- Tab1 (described in tab1.h file) has a QLineEdit widget.
- Tab2 (described in tab2.h file) has a QTableWidget widget.
They are added to Application in tabDialog.h file like this:
tabWidget->addTab(Tab1,"Tab1");
tabWidget->addTab(Tab2,"Tab2");
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(tabWidget);
setLayout(layout);
When user run my Application, text in QTableWidgetItem (in Tab2 Table) have to be changed when user press "Enter" in QLineEdit widget (in Tab1).
Could you please give me some idea how and where to connect SIGNAL(returnPressed()) from Tab1 with public slot from Tab2?
I have an Application with two Tabs:
- Tab1 (described in tab1.h file) has a QLineEdit widget.
- Tab2 (described in tab2.h file) has a QTableWidget widget.
They are added to Application in tabDialog.h file like this:
tabWidget->addTab(Tab1,"Tab1");
tabWidget->addTab(Tab2,"Tab2");
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(tabWidget);
setLayout(layout);
When user run my Application, text in QTableWidgetItem (in Tab2 Table) have to be changed when user press "Enter" in QLineEdit widget (in Tab1).
Could you please give me some idea how and where to connect SIGNAL(returnPressed()) from Tab1 with public slot from Tab2?