Have you seen this widget?

For some time we have been searching for this widget for Krita. It’s basically a button group with adjacent buttons (see the mockup that Jaroslaw made).

It’s a very common UI element e.g. in Plasma or Blender, but it seems that  no KDE application uses it. So has anyone seen this widget used in KDE (outside Plasma) or implemented it?

I’m asking because if doesn’t exist yet (which is very unlikely in my opinion) we would have to implement it ourself and I would prefer not to duplicate existing work.

Advertisements

13 Responses to “Have you seen this widget?”

  1. Yuriy Says:

    I was searching for something like this as well and was surprised not to find it in Qt or KDE.

  2. Jonathan Thomas Says:

    What Plasma uses is iirc a tabwidget with a paint() function that makes it look like the mockup.

  3. Christoph Says:

    It is up to the style. Bespin for example can do this. And there is some CSS based style used for a demo browser, see http://labs.trolltech.com/blogs/2009/09/15/using-blur-behind-on-windows/

    Also see http://www.slideshare.net/qtbynokia/how-to-make-your-qt-app-look-native there is something about “a segmented button”.

  4. Dread Knight Says:

    Go Krita! 🙂

  5. Starke Says:

    Just looks like three buttons, set to checkable, inside a horizontal layout with CSS style.

  6. marco martin Says:

    plasma uses a custom paint on a qtabbar. i doubt this exists as qwidget at least as far i know.
    but this is semantically very near to a qtabbar indeed, so if you don’t find it i suggest subclassing a tabbar as well to do it

  7. slangkamp Says:

    Looks like the CSS solution hard codes images and that doesn’t work with text that has to be translated.

  8. Thomas Zander Says:

    I think you can do this using plain Qt using a frame and toolbuttons. Here is a mockup I did in Designer. http://pastebin.com/download.php?i=yCcn8rzx (save with extention .ui)

    Hope that helps 🙂

  9. lunarcloud Says:

    Yea, it’s called a segmented button.

  10. TheBlackCat Says:

    Gwenview has this (in the bottom bar, the “fit” and “100%” buttons), but it is a pretty ugly hack involving overloading with the painter and moving a bunch of stuff around. I wasn’t able to find a built-in way to do it in either Qt or KDE when I was looking at the code a couple of months ago.

  11. slangkamp Says:

    Thanks for all the suggestions.

  12. Dotan Cohen Says:

    Rekonq has them on blank tabs.

  13. muesli Says:

    Since the behaviour is a lot like that of a QRadioButton, I’d simply CSS style that existing widget…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: