Tengo un par de problemas con un programa que estoy haciendo.
Primero, me gustaria saber como bloquear un QcomboBox una vez seleccionada una opcion.
Y el otro problema es que al entrar en la funcion que hos pego debajo, al estar en un bucle sin fin si intento picar dentro de la ventana me dice que no responde.
Hay alguna manera de poder hacer el bucle pero que no me lanze el mensaje este,
Código:
void MainWindow::show_text()
{
unsigned char uchar[256];
string buff;
QString qs;
int nCom;
std::stringstream stm;
nCom = ui->comBox->currentIndex()+1;
stm << nCom;
if (!this->comhandle)
{
if ((this->comhandle = DllOpenComm(nCom)) == 0)
{
buff = "COM"+stm.str()+" : Puerto incorrecto";
qs = buff.c_str();
ui->errorBrowser->setText(qs);
}
else
{
ui->comBox->setFrame(false);
}
}
if (this->comhandle)
{
buff = "COM"+stm.str()+" : Passar la tarjeta...";
qs = buff.c_str();
ui->errorBrowser->setText(qs);
buff.clear();
while (DllISO16693_Inventory(this->comhandle, uchar, buff) != 0)
{
buff.clear();
Sleep(500);
}
qs = buff.c_str();
ui->textBrowser->append(qs);
}
}