30

Does Qt support ribbon control?

dreftymac
  • 31,404
  • 26
  • 119
  • 182
jozi
  • 2,833
  • 6
  • 28
  • 41
  • 2
    @smerlin : sorry for being stupid but how ? – hamza Apr 23 '11 at 21:37
  • @hamza: by creating your own widget class which provides the desired functionality. Such a widget would contain other predefined qt widgets, like QPushButtons. For overriding the default look of those widgets, you are left with 3 choices: a) stylesheets b) custom QStyle class, c) custom paintEvents. Option a) is the easiest, but has worst performance. Option b) is quite difficult and Option c) requires you to subclass thooes basic widgets like QPushButton aswell. Going with Option a) might be the best solution unless you have experience with creating custom QStyles. – smerlin Apr 23 '11 at 23:14
  • Of course, but anyone not wanting to "reinvent the wheel" [checkout my answer below](https://stackoverflow.com/a/66774301/10774832)! (just checked the time, at that time there was no free open-source implementation). – S. Goody Mar 24 '21 at 03:28

8 Answers8

12

I want to share with you the link to site has published screenshots of their component Qtitan Ribbon for Qt. http://www.devmachines.com/qtitanribbon-overview.html

enter image description here

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
John
  • 152
  • 1
  • 2
  • 7
    Alas, the cost for this is far too high. – metal Oct 02 '13 at 12:47
  • 1
    Just a heads-up: We are using a (different) component from this company and their support and documentation are abysmal. You might want to look for a different solution. – i know nothing Feb 06 '17 at 11:51
  • d= (-_- ) Thanks, but there are free alternatives like [Qt-Ribbon-Widget](https://github.com/martijnkoopman/Qt-Ribbon-Widget) as well! (Oh, just saw the date, at that time there were no good free alternatives). – S. Goody Mar 24 '21 at 03:11
  • $500 for a ribbon? Are they crazy? – Gary Allen Oct 05 '21 at 07:00
3

You can take any JavaScript/JQuery ribbon, insert it into QWebView and do whatever you want with it, using the Qt Webkit Bridge.

Петър Петров
  • 1,966
  • 1
  • 17
  • 14
3

While there is no dedicated Ribbon widget in Qt, you can fashion something similar yourself. You could take a QTabWidget and put some buttons inside (and optionally style it to look a bit more like Microsoft's Ribbon). Depending on what you're trying to accomplish, that might suffice.

Kitsune
  • 9,101
  • 2
  • 25
  • 24
3

One of their sample apps apparently has a ribbon, so it should be do-able.

http://qt.nokia.com/images/products/vtk-designer-opengl-screenshot

mhenry1384
  • 7,538
  • 5
  • 55
  • 74
  • It is not the Ribbon control used in Microsoft Office. It's authored by [Prashanth N Udupa](http://www.prashanthudupa.com/about-me/), he named it `Menu strip`. Refer to his Qt Contest 2007 Award Winner : [Generic Component Framework](http://www.qtcentre.org/threads/9331-Generic-Component-Framework). – menjaraz Dec 30 '11 at 18:38
1

There is no Qt ribbon control. I believe there are license issues preventing Nokia from developing a ribbon control that is similar to Microsofts.

CiscoIPPhone
  • 9,457
  • 3
  • 38
  • 42
1

There are free alternatives to QtitanRibbon by now, for example, checkout:
https://github.com/martijnkoopman/Qt-Ribbon-Widget

enter image description here

You can even directly use it in any *.ui file!
Simply add a QTabWidget in QtDesigner and then promote that widget to the Ribbon class.

S. Goody
  • 360
  • 1
  • 2
  • 10
  • Although this looks a little different, in my IMHO, better use this and never get sued by Microsoft (for looking exactly the same). – S. Goody Mar 24 '21 at 03:33
0

No, it doesn't. I didn't find out any plan to support it in the future.

Cătălin Pitiș
  • 14,123
  • 2
  • 39
  • 62
0

We use QtitanRibbon, and it works very well for us. Support has been good, documentation on the short side. Worth noting that it not only provides a ribbon UI, it also makes it convenient to implement dark mode (or in our case, we opted for grey mode).

Dag B
  • 621
  • 3
  • 8
  • But it is commercial solution, too expensive for individual developer. – Linfeng Mu Nov 10 '22 at 05:23
  • The full ribbon behavior is quite complicated, so if you don't need that I suggest you follow the advice above to build a QTabBar populated with appropriate QToolButton actions. – Dag B Nov 11 '22 at 07:54