PDA

View Full Version : QInputDialog default value



dbrmik
25th March 2009, 15:04
Hi

I am trying to set the default value for a QInputDialog



double d= QInputDialog::getDouble(this,"Please enter Log base","Log Base = ",1.027459485, 1.0, 2.0 ,10, &ok);


However when I display the dialog the default value is display as

1.0300000000

Why is this?

Regards

jpn
25th March 2009, 15:28
Try creating an instance of QInputDialog and adjusting the number of decimals.

dbrmik
25th March 2009, 16:07
Hi

I tried that and adjusting the number of decimals . Still getting

1.0300000000

but with more or less decimals depending on the precision

Thanks