Forum
Sign Up

Possible to only use RibbonPage?

11 years 6 months ago - 11 years 6 months ago #1 by Andre Somers
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>

Last edit: 11 years 6 months ago by Andre Somers. Reason: Added code and backtrace

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago - 11 years 6 months ago #2 by Developer Machines
We did not expected that the ribbon's pages can be used without a bar. Therefore, there is really crash in this case. The problem has already been fixed and fix will be availalbe in the next update or by request.
Also there were some problems with rendering. See attached screenshot.
Attachments:
Last edit: 11 years 6 months ago by Developer Machines.
The following user(s) said Thank You: Andre Somers

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #3 by Andre Somers
Thank you for taking the time to look into this! That is great.
You see, people always come up with unexpected uses of your classes, so you'd better be prepared for that ;)

I would love to try out the fixed version if possible, so I can see if it really would work UI-wise for our case. For now, the visual glitches are not a real issue. If this would become a supported use case, I'd expect they'd be fixed at some point as well, right?

Anyway, thank you for looking into this report, I really do appreciate it. If you could make a test version available, then I'd need the MinGw build version.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #4 by Developer Machines
>> If this would become a supported use case, I'd expect they'd be fixed at some point as
well, right?

Yes, of course.

Ok. I will prepare the fixed build and send it to you tomorrow (during the day) by email.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #5 by Andre Somers
Awesome, thanks!

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #6 by Andre Somers
Could it be that there is another small issue with this?
The ribbon page shows up nicely in our test application, but the tooltips are not the fancy tooltips you see in the demo application.

Is this an issue with only using the RibbonPage, or do I need to explicity enable or disable this feature somewhere?

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.163 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )