Not really. You can fetch the "possible valid" state from the logic and cache it somehow and use an intermediate state when you suspect the input to be incomplete.
I think I just answered that as wellAnd here becomes the problem. I cannot assume a call to Business Logic EVERY time a date is Acceptable, because that call could be very time-expensive.
What happens if you just keep pressing tab (possibly inside an invalid field)?OK, I accept perhaps is an "strange approach", but is working. And it's quick and efficient. Sometimes we must break "programming-guidelines" to obtain a better performance...
As I said in the previous post, you're manipulating with the focus too much. Remember that focusOut causes a focusIn elsewhere and then you force the focus back which again causes a focusOut and focusIn. What does your focusOutEvent look like anyway?And I repeat that the problem is not in the validation style but in the fact that everything is working OK, but the cursor dissapears when between the focusout and the focusin I show a message on an external StatusBar. But when i show a modal message, all is running OK![]()
Sure, but this is easily overcomable. Check if calling selectAll() on the line edit helps.But you will agree with me that I will have the same problem. When I emit the signal, I receive a "invalid" response and move the focus, "I'm fuc***"![]()
I think you should just reject the focus out event.I agree with you that StatusBar is stealing the focus, But I don't understand why...
I'm calling a method like this in the focusout event ( pseudo-code )
Maybe you should just use a QDataWidgetMapper? Most of the things you require are already there, I think... Anyway, you can repair the tab order with a simple function, as I mentioned before.Yes, a QlineEdit. But not a QComboBox, or QRadioButton... And I do need to control that kind of widgets too![]()
Bookmarks