I tried so:
void qpastebin::IndexChangedCode() {
codeList->setCurrentIndex(codeList->currentIndex());
}
void qpastebin::IndexChangedExpd() {
dataExp->setCurrentIndex(dataExp->currentIndex());
}
void qpastebin::IndexChangedPriv() {
apiPrivate->setCurrentIndex(apiPrivate->currentIndex());
}
void qpastebin::IndexChangedCode() {
codeList->setCurrentIndex(codeList->currentIndex());
}
void qpastebin::IndexChangedExpd() {
dataExp->setCurrentIndex(dataExp->currentIndex());
}
void qpastebin::IndexChangedPriv() {
apiPrivate->setCurrentIndex(apiPrivate->currentIndex());
}
To copy to clipboard, switch view to plain text mode
and slots:
private_stat = apiPrivate->itemData(apiPrivate->currentIndex()).toString();
prog_lang = codeList->itemData(codeList->currentIndex()).toString();
date_expire = dataExp->itemData(dataExp->currentIndex()).toString();
connect(codeList, SIGNAL(currentIndexChanged(int)), this, SLOT(IndexChangedCode()));
connect(dataExp, SIGNAL(currentIndexChanged(int)), this, SLOT(IndexChangedExpd()));
connect(apiPrivate, SIGNAL(currentIndexChanged(int)), this, SLOT(IndexChangedPriv()));
private_stat = apiPrivate->itemData(apiPrivate->currentIndex()).toString();
prog_lang = codeList->itemData(codeList->currentIndex()).toString();
date_expire = dataExp->itemData(dataExp->currentIndex()).toString();
connect(codeList, SIGNAL(currentIndexChanged(int)), this, SLOT(IndexChangedCode()));
connect(dataExp, SIGNAL(currentIndexChanged(int)), this, SLOT(IndexChangedExpd()));
connect(apiPrivate, SIGNAL(currentIndexChanged(int)), this, SLOT(IndexChangedPriv()));
To copy to clipboard, switch view to plain text mode
But all the same data from QComboBox only those who are selected by default ...
Please show an example would be very grateful
Bookmarks