Custom DoubleSpinBox needed

  • I would like to have a Custom DoubleSpinBox which could able to increase/decrese the value based on the current cursor.
    I know that there might be some confusing on the statement above, I will show an example:

    The spinbox is showing : 1.234
    When i click on the point before number "3", the cursor is blinking infront of number "3".
    After that, when I click on the up button on the SpinBox, the SpinBox value will show: 1.244.
    For the same theory, when my pointer is infront of number "1", when i click button up, the value of SpinBox will become : 2.244.

    This similar functionality is available in the DateTimeEdit, but the DateTimeEdit cannot change the display format from DateTime format to pure Number Format (correct me if i'm wrong in this view). And I could not get the source code of DateTimeEdit to understand how it work.

    So, do any can help me to get the SpinBox with such functionality (either modify from QSpinBox or QDateTimeEdit)?

  • Hi!

    You can view the source code of QDateTimeEdit and QSpinBox in "Gitorious":

    I would also thoroughly study the documentation of QDoubleSpinBox.


    David Gil

  • You may inherit and edit it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.