Hello,
I am checking my application part by part.
I am doing something like this
case Key_Enter: // Mapped with Enter Key
{
qDebug( "Key Press Event: Enter" );
enterpushButton->setFocus();
if ( TRUE == XSet )
{
XSet = FALSE;
input = xlineEdit->text().toDouble();
if ( input >= 0 && input < 99999.999){
XVal = ((input * 1000) / (1000));
qDebug ( "XVal : %5.3lf",XVal);
xlineEdit->setText(QString::number( XVal, 'f', decimals_mm ) );
}
else if(input > 9999.999){
xlineEdit->setText(" OVERFLOW ");
}
else if(input < 0 && input >= -99999.999){
xlineEdit->setMaxLength(10);
XVal = ((input * 1000) / (1000));
qDebug ( "XVal : %5.3lf",XVal);
xlineEdit->setText(QString::number( XVal, 'f', decimals_mm ) );
}
else if(input > -99999.999){
xlineEdit->setText("OVERFLOW ");
}
}
}
This code works fine in the host .
But in the target when i press enter key if entered digits is more than 5 it should display "OVERFLOW" and it works fine in the target ..
But if entered digits is less than 5 it should display double value of what i entered but
gui hangs but i get the double value(qDebug) in the console .
I strace the same finally i got this,
write(2, "Key Press Event\n", 16Key Press Event
) = 16
write(2, "Key Press Event: Enter\n", 23Key Press Event: Enter
) = 23
ioctl(4, FIONREAD, [0]) = 0
write(5, "\0", 1) = 1
ioctl(4, FIONREAD, [1]) = 0
ioctl(4, FIONREAD, [1]) = 0
write(2, "XVal : 789.000\n", 15XVal : 789.000
) = 15
old_mmap(NULL, 626950144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
brk(0) = 0x52000
brk(0x25639000) = 0x52000
old_mmap(NULL, 626950144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
old_mmap(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x40a19000
munmap(0x40a19000, 946176) = 0
munmap(0x40c00000, 102400) = 0
mprotect(0x40b00000, 32768, PROT_READ|PROT_WRITE) = 0
old_mmap(NULL, 626950144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mprotect(0x40b08000, 8192, PROT_READ|PROT_WRITE) = 0
mprotect(0x40b0a000, 16384, PROT_READ|PROT_WRITE) = 0
mprotect(0x40b0e000, 32768, PROT_READ|PROT_WRITE) = 0
mprotect(0x40b16000, 65536, PROT_READ|PROT_WRITE) = 0
[4] + Stopped strace ./debug -qws
Best regards,
soumya
Hi,
I added the macro -DQT_QLOCALE_USES_FCVT while compiling ,
./configure -embedded arm -shared -no-cups -DQT_QLOCALE_USES_FCVT
Now it works fine in the target.
Thanks for the support
Bookmarks