Does Qt support ribbon control?
-
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 Answers
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

- 11,743
- 10
- 52
- 81

- 152
- 1
- 2
-
7
-
1Just 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
-
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
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.

- 9,101
- 2
- 25
- 24
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

- 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
There is no Qt ribbon control. I believe there are license issues preventing Nokia from developing a ribbon control that is similar to Microsofts.

- 9,457
- 3
- 38
- 42
-
-
Never was a problem as tons of implementation on windows show. It was just that Qt does not favor GUI anymores – Lothar May 22 '15 at 02:49
There are free alternatives to QtitanRibbon
by now, for example, checkout:
https://github.com/martijnkoopman/Qt-Ribbon-Widget
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.

- 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
No, it doesn't. I didn't find out any plan to support it in the future.

- 14,123
- 2
- 39
- 62
-
While I agree, this should be a comment: it does not represents an answer – Adrian Maire Oct 08 '21 at 11:56
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).

- 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