ok thank you, that got me started, now here is my issue.
When retrieving the value from my combo box i'm using
connect(ui
->comboBox,
SIGNAL (activated
(const QString)),
this,
SLOT(dropdownValue
(const QString)));
//and the related function:
void dcsTS
::dropdownValue(const QString dcmname
){
tmpstring = string(dcmname.toAscii()); //tmpstring is a public string variable
}
connect(ui->comboBox, SIGNAL (activated(const QString)), this, SLOT(dropdownValue(const QString)));
//and the related function:
void dcsTS::dropdownValue(const QString dcmname){
tmpstring = string(dcmname.toAscii()); //tmpstring is a public string variable
}
To copy to clipboard, switch view to plain text mode
Now when in the other class I make an instance of dcsTS and try to access tmpstring which is a public variable. That works out fine, except that the string is empty!!
Any ideas about how to fix this?
also: I've tried using tmpstring as a char* and making a QByteArray and converting that to a char* and then inside the other class accessing tmpstring and converting it to a real string but when I do that I just get unreadable characters and nonsense in my string.
Bookmarks