1

I am started to implement the microsoft ribbon interface on the qt library but finally understand that it is too complex task for me.

So I decided to use native mfc ribbon inside my application.

But the main question is how to do this?

AeroSun
  • 2,401
  • 2
  • 23
  • 46
  • 1
    There is no *"native MFC ribbon"*. MFC provides a wrapper around the native ribbon framework exposed through the Windows API. It is unclear what you are having problems with, or why you expect that using fewer abstractions would make the job easier. – IInspectable Oct 05 '18 at 07:17
  • MFC wrapper take few work to self, but I would appreciate for help with Win API too. I mean how to use this ribbon toolbar in qt application. – AeroSun Oct 05 '18 at 10:02

1 Answers1

1

Qt does not have native "MFC Ribbon", but the closest thing available is QTabWidget. You can use CSS stylesheets to make it look somewhat like MFC Ribbon. If you want exact look of MFC Ribbon, then you need to reimplement paintEvent and draw the widget as you need.
Some CSS Examples to get you started.
1) https://gist.github.com/espdev/4f1565b18497a42d317cdf2531b7ef05
2) http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar

There is a pre-built library called QtitanRibbon, although it's not free take a look into the free trial version.
Also check out this answer

Gurushant
  • 952
  • 6
  • 23
  • The color and tab looks is the most simple part. The complexiest part of the ribbon implementation - is it layout and dynamical size change. Its too hard implement over the qt layouts. The QTitanRibbon have completly inadequate price so it unusable in any case. – AeroSun Oct 05 '18 at 10:09
  • 1
    @AeroSun It's true. If you are familiar with C# then I suggest you to create your presentation layer in C# since it is easy to implement ribbon there – Gurushant Oct 05 '18 at 10:39