QLineEdit: Sample to work with numeric ( with decimals ) !

352 views
Skip to first unread message
Assigned to ron...@gmail.com by me

M., Ronaldo

unread,
Oct 18, 2013, 6:26:48 PM10/18/13
to qtcon...@googlegroups.com
HI All !


Can I have a generic example for a QLineEdit working with numerics ( with fixed decimals and comma as decimal separator  ) ?


Tryed using Mask, QDoubleValidator and QRegExpValidator, but not works as expected :(
*** Wrong display, wrong  number of decimals, ugly mask, ...
*** hbQtWidgets works fine, but is not an option for this case.


Thanks


Regards

M., Ronaldo

unread,
Oct 20, 2013, 4:11:39 AM10/20/13
to qtcon...@googlegroups.com
Hi Friends !


Solved: After upgrade to qt5.1.1 QDoubleValidator is working fine ( now QLineEdit accept only numbers and limited decimals )


Qt 5.1.1 buid with msvc2010 ( opengl ): files needed on windows

\bin\Qt5Core.dll            4.339.712k
\bin\Qt5Gui.dll             3.994.624k
\bin\Qt5PrintSupport.dll      226.304k
\bin\Qt5Widgets.dll         4.271.104k
\bin\platforms\qminimal.dll    22.016k
\bin\platforms\qwindows.dll   838.656k
\bin\sqldrivers\qsqlite.dll   620.032k ( to use with qsqlmoldel )
-----------------------------------------------------------------
Total Size................ 14.312.448k ( 14.31 mb )



If some body have an alternative way (
QLineEdit working with numerics ), please: feel free to post here :)



Thanks for support


Regards
Reply all
Reply to author
Forward
0 new messages