Saturday, July 5th 2008, 6:34am UTC+1

You are not logged in.

  • Login
  • Register

1

Thursday, May 15th 2008, 9:07pm

QSpinBox with negative step

Is there a way to get QSpinBox to accept a negative step (this is with QT3)? The documentation makes no reference to a limitation on the value of the step, and the arguments tag it as an int, which implies it could be negative or positive.

However, every time I pass it a negative value, it uses only the absolute value (as seen both by observation, as well as calling the lineStep() function to return the value).

I simply want the up arrow to decrement, and the down arrow to increment. Is there a way to do that simply without having to subclass it?

Thanks.
  • Go to the top of the page

Wim

Beginner

2

Tuesday, May 20th 2008, 9:23am

I have currently no easy way to check the Qt3 source code, but in Qt4 you have to subclass if you want to do that, so I presume that it is the same in Qt3.

You can always check the code yourself to see how things are handled.

I hope this helps.
  • Go to the top of the page

Rate this thread