Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How enter and display properties of double type in scientific notation #46

Open
kleomash opened this issue Jun 29, 2021 · 2 comments
Open
Assignees

Comments

@kleomash
Copy link
Contributor

kleomash commented Jun 29, 2021

Hi!

I operate with small values which should be entered in scientific notation. For example 0.000000001 is more convenient when written as 1.0e-9.

Is it possible to set up display format for qtnCreateProperty?

@lexxmark lexxmark self-assigned this Jun 30, 2021
@lexxmark
Copy link
Collaborator

Visual aspects of properties can be tuned by property delegates.

For example for Float property we have QtnPropertyDelegateFloat default delegate with min/max/step/suffix/multiplier/precision attributes which can be configured.

To modify these attributes you can use code like this:

    auto p = qtnCreateProperty<QtnPropertyFloat>(parent);
    p->setDelegateAttribute("min", -3);

Scientific/Regular notation is not supported now. I think it could be implemented in the existing delegate class or implemented as a separate delegate.

@kusharami It seems QtnPropertyDelegateFloat delegate was heavily refactored by you. What do you think about scientific notation support for Double/Float? Can we add such support to the existing delegate?

@kusharami
Copy link
Contributor

kusharami commented Jul 17, 2021

What do you think about scientific notation support for Double/Float? Can we add such support to the existing delegate?

It seems that a new floating point spin box implementation is needed to achieve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants