Gopala Krishna
24th September 2006, 16:08
Hello friends,
I am porting an app not originally coded by me from Qt3 to Qt4. I am also improving the readability and design of code. While porting I came across a design issue. The problem is with the dialog whose pic is attached. It actally uses pure c++ (ported as it is from c without using signal-slot mechanism) as backend for the calculations.
Whenever the the value in leftmost combobox(in Transmission Line Type group box) is changed there are corresponding changes. The changes include disabling or hiding of some comboboxes,linedit and labels (some rows of widgets). This results in changes in sizes of child widgets as well as dialog which I don't want to happen.
This is achieved by using many structures which holds pointers to comboboxes, lineedits, labels.. Other than this lots of instances of layouts ,Q*Boxes,Q*GroupBoxes are used to manage this. This has really increased my problems in porting since Qt4 doen't have QVBox,QHBox,QVGroupBox,QHGroupBox forcing me to manage layouts manually.
So, I thought I can create a widget to manage these properties,units,combo boxes and line edits in much easier way. I have attached the code for this. It works(but I haven't tested it much)
But I think there exists a cleaner solution for this. Especially I think I can incorporate model-view design to this and make the code simpler.
So, I request your suggestions regarding
Design of dialog(placement of widget)
any other qt4 widget alternatives
model-view concerning this
Overall design of dialog (managing availability and inavailability of widgets)
Thanks for your time.
I am porting an app not originally coded by me from Qt3 to Qt4. I am also improving the readability and design of code. While porting I came across a design issue. The problem is with the dialog whose pic is attached. It actally uses pure c++ (ported as it is from c without using signal-slot mechanism) as backend for the calculations.
Whenever the the value in leftmost combobox(in Transmission Line Type group box) is changed there are corresponding changes. The changes include disabling or hiding of some comboboxes,linedit and labels (some rows of widgets). This results in changes in sizes of child widgets as well as dialog which I don't want to happen.
This is achieved by using many structures which holds pointers to comboboxes, lineedits, labels.. Other than this lots of instances of layouts ,Q*Boxes,Q*GroupBoxes are used to manage this. This has really increased my problems in porting since Qt4 doen't have QVBox,QHBox,QVGroupBox,QHGroupBox forcing me to manage layouts manually.
So, I thought I can create a widget to manage these properties,units,combo boxes and line edits in much easier way. I have attached the code for this. It works(but I haven't tested it much)
But I think there exists a cleaner solution for this. Especially I think I can incorporate model-view design to this and make the code simpler.
So, I request your suggestions regarding
Design of dialog(placement of widget)
any other qt4 widget alternatives
model-view concerning this
Overall design of dialog (managing availability and inavailability of widgets)
Thanks for your time.