PDA

View Full Version : Tab Order Settings in a QDialog widgets



vinnu
12th September 2006, 08:27
Hai

I am using QT3.3.5 version.I have a problem with tab order settings.
I have set the tab order from Tools->tabOrder.Blue color circles appeared for every widget and depending on the requirement i have set the order.I have viewed the Dialog in Preview form and checked for the tab order.It is working very well.

When i have run my appliaction and see then the tab order settings is moving randomly with out prior tab number beside every widget.

I have four line edits followed by 4 combo boxes.These 8 widgets are layed out in to one group.Next i have 2 combo boxes which are layed out as one group.

During Runtime tab order is continouus for four LIne edits .After the 4th lineEdit it has to enter into the combo box...but it is skipping all the 4 comboboxes present in the 1st layout and jumping into the combo box of 2nd layout.

I couldnt understand why this problem is occuring.

Thanks for the Help in Advance

vinnu

sunil.thaha
12th September 2006, 08:47
Can u upload the UI file

vinnu
12th September 2006, 08:56
Hai

Its against the rules of our company.

But i can say u that the focus policy for LIne Edits is set a strongfocus and for combo boxes it is set as TabFocus and for buttons also it is set as TabFocus.

Thanking you
vinnu

vinnu
12th September 2006, 11:13
Hai

in spite of having the tab order settings correctly it is not effective during runtime of the application whereas in preview mode the tab order settings is working correctly.

I have worked out in QT 3.3.5 and QT 3.3.2. But then the same situation has aroused in both the versions.

But when I have written the SetTabOrder () function in the derived class for each and every widget I am able to get the tab order correctly.

But this function gets invoked in the base class when the tab order for a dialog is set thru Tools->TabOrder and compiled. same as compiling of ui file we get the somefiledata.h and somefiledata.cpp files.same way a function for setting of tab order is added in the base class.

Help is needed in this issue

Thanking you
vinnu

jacek
12th September 2006, 14:04
Please, don't post the same question twice in different forums.

Do you add any widgets to your form or reparent them? If you can't post original files, then maybe you could prepare a minimal, compilable example that reproduces the problem, so that we can see what's wrong?

vinnu
13th September 2006, 08:37
Hai

I have first used non editable combo boxes before the tab order was set.Then after this i made the non editable combo boxes to Editable combo boxes.From this onwards i am unable to follow the tab order settings correctly.

is there any way of coding for the tab order property of editable combo box other than making the editable property to true in the property sheet using designer.

Thanking you
vinnu

jacek
13th September 2006, 12:40
I have first used non editable combo boxes before the tab order was set.Then after this i made the non editable combo boxes to Editable combo boxes.From this onwards i am unable to follow the tab order settings correctly.
Indeed there's something strange happening. I've created a small test program (see attachment) and I was able to reproduce this behavior on Qt 3.3.6. IMO you should ask the Trolls what they think about this.

vinnu
20th September 2006, 09:15
Hai

Thank u ..

Even here we felt it as QT bug.
But if i set the Editable Property to TRUE in QT designer then the tab order is working properly.
wat do u say on this...
Is this still can be a QT bug?

Thanking you
vinnu

jacek
20th September 2006, 14:55
But if i set the Editable Property to TRUE in QT designer then the tab order is working properly.
The problem is that the tab order changes when you change the editable property.

vinnu
21st September 2006, 11:21
hai

but why is the tab order working when i set the Editable property to true in the designer....wat is making to break the functionality when written in code and wat is making to work when we set the editable property to true in the designer.

thanking you
vinnu

jacek
21st September 2006, 17:25
wat is making to break the functionality when written in code and wat is making to work when we set the editable property to true in the designer.
I behaves just as if changing editable to true was causing a new widget to appear.