Results 1 to 3 of 3

Thread: How should I implement hide-able UI elements ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Location
    San Francisco, CA
    Posts
    23
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile How should I implement hide-able UI elements ?

    Hello

    I have a user interface for a database search that contains various
    combo boxes, line edit and check box widgets.

    In this example, these widgets can be used to help users refine a search.
    However these widgets are not necessary and ideally I would like
    to hide them under an 'Advanced' section as my UI is looking a little
    cluttered.

    I like Apple's folder UI (which also appears in the program Picassa etc.)
    where you have a little triangle on the left which you
    can click to reveal the hidden UI contents .. another click will hide them
    again.

    What would it take to build this ?

    I don't believe there is a QT widget to do all the work so what should I use ?
    The only thing that is close is a tree widget as you have the little plus signs
    to reveal children but I don't believe it would be customizable enough. (?)

    A really nice bonus would be to have the contents animate down like hidden
    comments do on digg.com.

    Any ideas among you great programmers out there ?

    Thanks

    barnaby.

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How should I implement hide-able UI elements ?

    If you look into the book c++ GUI Programming with Qt 3 there is an example in chapter 2 which talks about shape changing dialog. I think that example might be useful to you. The only difference between that example and your requirement is that you want the expansion to happen horizontally whereas in the example, the widget extends vertically.

  3. The following user says thank you to munna for this useful post:

    barnabyr (30th April 2006)

  4. #3
    Join Date
    Mar 2006
    Location
    San Francisco, CA
    Posts
    23
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How should I implement hide-able UI elements ?

    thank you for the link ... I read the chapter ..
    and it seems the simple case is embarassingly simple !

    you just connect a button or some animating label widget to
    the widget-you-want-to-appear's show() or setVisible() slot !

    I wonder if there is an equally simple way to do the animated reveal
    of the extra UI where it crawls down or across ?

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.