matrices
Last change
on this file since 44d1e60 was
44d1e60,
checked in by Jose Ruiz <joseruiz@…>, 9 years ago
|
commit inicial
|
-
Property mode set to
100644
|
File size:
723 bytes
|
Line | |
---|
1 | #include "stackwidget.H" |
---|
2 | |
---|
3 | StackWidget::StackWidget(int accountNumber, QWidget *parent) : |
---|
4 | QWidget(parent) |
---|
5 | { |
---|
6 | layoutMain = new QVBoxLayout; |
---|
7 | |
---|
8 | comboAccount = new QComboBox(this); |
---|
9 | |
---|
10 | stackedWidget = new QStackedWidget(this); |
---|
11 | |
---|
12 | for (int i = 0;i < accountNumber; ++i) |
---|
13 | { |
---|
14 | comboAccount->addItem(QString("Cuenta %1").arg(i + 1)); |
---|
15 | |
---|
16 | AccountWidget * widget = new AccountWidget(stackedWidget); |
---|
17 | |
---|
18 | stackedWidget->addWidget(widget); |
---|
19 | |
---|
20 | widgetList.append(widget); |
---|
21 | |
---|
22 | } |
---|
23 | |
---|
24 | layoutMain->addWidget(comboAccount); |
---|
25 | layoutMain->addWidget(stackedWidget); |
---|
26 | |
---|
27 | setLayout(layoutMain); |
---|
28 | |
---|
29 | connect(comboAccount, SIGNAL(activated(int)), |
---|
30 | stackedWidget, SLOT(setCurrentIndex(int))); |
---|
31 | } |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.