Limiting values for custom designer properties
Hi,
Is there a way to tell designer to limit the possible user input for a particular property?
In my case I have a property which is an unsigned int (since it should never be negative), but I could not find a way to limit the input at design time to be > = 0.
So at the moment, when the user enters -1 designer crashes for an obvious reason.
Thanks in advance.
Re: Limiting values for custom designer properties
In your methods which handle properties you should do sanity checks of entered values and correct them if they are wrong. From my observations (in Qt3) it looks like that after setting a property immediately Qt asks for its value, so it should show a corrected value.
Re: Limiting values for custom designer properties
I would do that, but the problem is even before I can do a sanity check, since my method accepts an unsigned int, and when designer trys to call it with a -1, it crashes, with out me having a chance to correct the value in my method... that is exactly my question - is it possible to install "sanity check" (or simply limits) to the values that a user can enter in the properties window?
Re: Limiting values for custom designer properties
Re: Limiting values for custom designer properties
Qt4
(Sorry forgot to mention)