Results 1 to 2 of 2

Thread: Dialog and code design issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    37
    Thanked 53 Times in 40 Posts

    Lightbulb Dialog and code design issue

    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
    1. Design of dialog(placement of widget)
    2. any other qt4 widget alternatives
    3. model-view concerning this
    4. Overall design of dialog (managing availability and inavailability of widgets)

    Thanks for your time.
    Attached Images Attached Images
    Attached Files Attached Files

Similar Threads

  1. Replies: 3
    Last Post: 23rd July 2006, 18:02
  2. how to get code for dialog in qt4.1.2
    By quickNitin in forum Newbie
    Replies: 8
    Last Post: 8th June 2006, 14:35
  3. [QT4 & XP] QTreeView issue with Designer form
    By incapacitant in forum Newbie
    Replies: 3
    Last Post: 2nd March 2006, 17:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.