<div dir="ltr"><div dir="ltr" class=""><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">I believe int is considered qint32, by specifying the type you are actually casting your python int to 32 bit signed integer, thus the overflow.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">The solution is to simply remove the type: settings.value('key')<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 16, 2024 at 7:51 PM Gottfried Müller <<a href="mailto:gottfried.mueller@gmx.de">gottfried.mueller@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
reading an integer value with a huge value (for example: 2845924041) is<br>
converted in a negative value (-1449043255) using<br>
<br>
settings.value("bigInteger", type=int)<br>
<br>
As a workaround I read this value with type=str and convert it in the<br>
Python code to an integer value. Is there a way getting the right<br>
positive value by settings.value?<br>
<br>
Gottfried<br>
<br>
<br>
</blockquote></div></div>