Results 1 to 11 of 11

Thread: advanced split widget

  1. #1
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default advanced split widget needed

    Hi

    I need the widget like in the attached picture. It consists of some child widgets (like dock widgets of dock area) but they haven't been undocked. The split configuration is set with use of some methods and user haven't an ability to change this configuration. User may hide some child widgets by pressing on 'X' button and maximize particular child widget by pressing 'M' (other widgets will be hidden). The ability to show hidden (iconified) widgets should be provided.

    QDockArea is not the case because it manages widgets only whether horizontally or vertically but not in the grid, isn't it?

    smart_split_widget.png


    The desired use of the class:

    Qt Code:
    1. SmarlSplitWidget container;
    2.  
    3. // Add a widget at 0 row and 0 col like in QGridLayout.
    4. container.addWidget(
    5. new QWidget(container), // pointer to widget
    6. "First", // label
    7. 0, // row 0 (like in QGridLayout)
    8. 0); // column 0
    9.  
    10. container.addWidget( new QWidget(container), "Second", 1, 0);
    11. container.addMultiCellWidget( new QWidget(container), "Fourth", 0, 1, 1, 1);
    12. container.addMultiCellWidget( new QWidget(container), "Third", 2, 2, 0, 1);
    To copy to clipboard, switch view to plain text mode 

    Is anybody may help to find the widget like this?

    Thanks,
    Vitaly
    Last edited by vitaly; 17th January 2006 at 15:21.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: advanced split widget

    You can have such behaviour by using splitters. Buttons "X" just hide the current widget and "M" hide all other widgets and that's it (I guess you also need opposite actions to get those widgets back on screen).

  3. #3
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: advanced split widget

    I know it but it is better to implement this functionality in a separate class. It will hide all manipulations with splitters and widgets and work with arbitrary number of widgets. Of course, it is not hard to implement for me but i waht to reuse any existing class.

    P.S. The attached picture in my first post I've created in Qt Designer using QSplitters and then captured the widget with GIMP.
    Last edited by vitaly; 17th January 2006 at 17:37.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: advanced split widget

    Then make one. I doubt anyone made such a class.

  5. #5
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: advanced split widget

    I'll implement it in some time and will post it. But what do you think, may this widget be really usable? Is there any storage for Qt-based C++ classes exist like CPAN for perl? I've looked at Qt store. This store has so few classes now.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: advanced split widget

    Quote Originally Posted by vitaly
    But what do you think, may this widget be really usable?
    I really don't know. It's usable for you, so I guess it's usable

    Is there any storage for Qt-based C++ classes exist like CPAN for perl? I've looked at Qt store. This store has so few classes now.
    We've been planing to make such a catalog here, but someone has to fill it with content. There is no point in making such thing if there are only 2-3 things to put there.

  7. #7
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: advanced split widget

    Quote Originally Posted by wysota
    We've been planing to make such a catalog here, but someone has to fill it with content. There is no point in making such thing if there are only 2-3 things to put there.
    Is there any "content" available? Since you've been around the qt community much more than most of us, are there any contributed widgets, classes, whatever, or even the will to provide some?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: advanced split widget

    Quote Originally Posted by yop
    Is there any "content" available? Since you've been around the qt community much more than most of us, are there any contributed widgets, classes, whatever, or even the will to provide some?
    Sure, there are Qt Widgets for Technical Applications, Johan's JSeries or mine wwWidgets and more.

    Some of them are listed on Johan's widget gallery.

    If you have widgets you'd like to share with Qt Community, you can send them to me and I'll put them into the widget repository when we decide to make one.
    Last edited by wysota; 17th January 2006 at 23:28.

  9. #9
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: advanced split widget

    Quote Originally Posted by wysota
    Sure, there are Qt Widgets for Technical Applications, Johan's JSeries or mine wwWidgets and more.

    Some of them are listed on Johan's widget gallery.

    If you have widgets you'd like to share with Qt Community, you can send them to me and I'll put them into the widget repository when we decide to make one.
    Thank's it's good to know

  10. #10
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: advanced split widget

    I found KDCloseableWidget in KD Tools pack of ICS (http://www.ics.com) but I didn't find any documentation related to this class. Only the datasheet with common information is available. Is anybody know does this class support multiple widgets with splitting and restoring ones from hidden state? Lot of thanks for your previous replies. The common store for Qt code is really needed for the community!

    It will be fine if there will be a place where all known Qt related links will be stored in the structured way. Qt center may be a good place for it.
    Last edited by vitaly; 18th January 2006 at 08:26.

  11. #11
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: advanced split widget

    I implemented the first version of grid split widget. This widget I implemented at home at free time. I haven't lots of time to fully done this work. So this version has many additional features whose I'll implement later. The current version supports closing and maximizing of widgets.

    If you desire to help develop this widget, please, contact with me or upload your patches or versions into this site. I will upload newest versions as soon as I find free time for improvement.

    TODO (I plan to do this later):

    1. Make setting of margins of widgets in the splitters.
    2. Fix initial size of child widgets.
    3. Make icons.
    4. Improve restore of widgets.
    5. Optimize it.

    I will appreciate any bugreport or feedback about this widget.

    Vitaly
    Attached Files Attached Files
    Last edited by vitaly; 24th January 2006 at 20:25.

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  3. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  4. Creating advanced widget in a delegate.
    By bunjee in forum Qt Programming
    Replies: 8
    Last Post: 5th February 2007, 08:09
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.