Hi, I am evaluating QtitanRibbon to see if we could use it in our GUI. We are interested in the way actions are shown in different sizes and in groups on the ribbon pages, but we don't need the real ribbon with tabs and all that. We just don't have that many actions to have that make sense.
Unfortunately, our first attempt to just manually create and position a RibbonPage object results in a crash, that we can't debug because there are only release binairies in the evaluation package it seems. Would this use case be possible, or can we only create and show a RibbonPage if we put it in a RibbonBar?
Edit:
Just for illustration, Let me show you the code I'm using:
void MainWindow::resizeEvent(QResizeEvent *e)
{
QPoint topLeft(3, height() * 0.08 + 3);
QPoint bottomRight(width() * 0.7, height() * 0.2 - 3 );
QRect r(topLeft, bottomRight);
m_page->setGeometry(r);
qDebug() << r;
}
void MainWindow::setupRibbonPage()
{
Qtitan::RibbonGroup* groupExamination = m_page->addGroup(tr("Examination"));
QStyle* style = qApp->style();
groupExamination->addAction(style->standardIcon(QStyle::SP_ComputerIcon), tr("Save"), Qt::ToolButtonTextUnderIcon);
groupExamination->addAction(style->standardIcon(QStyle::SP_BrowserReload), tr("Cancel"), Qt::ToolButtonTextBesideIcon);
}
If I change m_page to be a QPushButton instead of a Qtitan::RibbonPage (and disable setupRibbonPage()), then all works fine. I get my button at the place I would like the ribbon page to appear. However, if m_page is a Qtitan::RibbonPage, I get a crash somewhere in the ribbon library:
0 qtnribbon2!_ZN6Qtitan15RibbonStatusBarC2EP7QWidget C:\devTools\DevMachines\lib\qtnribbon2.dll 0 0x63101dca
1 qtnribbon2!_ZNK6Qtitan11RibbonStyle9drawGroupEPK12QStyleOptionP8QPainterPK7QWidget C:\devTools\DevMachines\lib\qtnribbon2.dll 0 0x6315dbbf
2 qtnribbon2!_ZNK6Qtitan11RibbonStyle11drawControlEN6QStyle14ControlElementEPK12QStyleOptionP8QPainterPK7QWidget C:\devTools\DevMachines\lib\qtnribbon2.dll 0 0x631530a1
3 qtnribbon2!_ZN6Qtitan11RibbonGroup10paintEventEP11QPaintEvent C:\devTools\DevMachines\lib\qtnribbon2.dll 0 0x63110e96
4 ZN7QWidget5eventEP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x677591e0
5 ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x6770fad0
6 ZN12QApplication6notifyEP7QObjectP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x677184f5
7 ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1caa40
8 ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x677604cd
9 ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x6776128e
10 ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x67760235
11 ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x6776128e
12 ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x67760235
13 ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x6776128e
14 ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x67760235
15 ZN14QWidgetPrivate11repaint_sysERK7QRegion C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x678e5ea9
16 ZN14QWidgetPrivate16syncBackingStoreEv C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x67750df4
17 ZN7QWidget5eventEP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x677594d2
18 ZN11QMainWindow5eventEP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x67ac47d0
19 ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x6770fad0
20 ZN12QApplication6notifyEP7QObjectP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x677184f5
21 ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1caa40
22 ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1cde62
23 ZN21QEventDispatcherWin3221registerEventNotifierEP17QWinEventNotifier C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1f187e
24 USER32!OffsetRect C:\Windows\syswow64\user32.dll 0 0x75bd62fa
25 USER32!CreateWindowStationW C:\Windows\syswow64\user32.dll 0 0x75bd80a9
26 USER32!IsWindow C:\Windows\syswow64\user32.dll 0 0x75bd6d3a
27 USER32!AnyPopup C:\Windows\syswow64\user32.dll 0 0x75bd77c4
28 USER32!IsDialogMessage C:\Windows\syswow64\user32.dll 0 0x75bd788a
29 ZN21QEventDispatcherWin3213processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1f4299
30 ZN19QApplicationPrivate14enterModal_sysEP7QWidget C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtGui4.dll 0 0x6777445c
31 ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1c971e
32 ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1c9b23
33 ZN16QCoreApplication4execEv C:\devTools\QtSDK\Desktop\Qt\4.8.1\mingw\lib\QtCore4.dll 0 0x6e1ce29f
34 ?? 0 0x401442
35 ?? 0 0x403555
36 ?? 0 0x403218
37 ?? 0 0x40124b
38 ?? 0 0x4012b8
39 KERNEL32!BaseCleanupAppcompatCacheSupport C:\Windows\syswow64\kernel32.dll 0 0x7716339a
40 ntdll!RtlpNtSetValueKey C:\Windows\system32\ntdll.dll 0 0x77789ef2
... <More>