Forum
Sign Up

RibbonTab::clicked() emits extra QApplication::focusChanged signal

5 years 1 month ago - 5 years 1 month ago #1 by Armen
Hi Folks,
Our MDI based product is consuming QTitanRibbon v4.17 and faced following issue:
when a ribbon tab is clicked, extra QApplication::focusChanged signal is emitted, as a result the active mdi child is changed.

Here is the stack trace:

_ZN11QMetaObject8activateEP7QObjectiiPPv, FP=7fffffffbe20
_ZN8QMdiArea18subWindowActivatedEP13QMdiSubWindow, FP=7fffffffbe50
_ZN8QMdiArea10childEventEP11QChildEvent, FP=7fffffffbea0
_ZN8QMdiArea16scrollContentsByEii, FP=7fffffffbed0
_ZN8QMdiArea25activatePreviousSubWindowEv, FP=7fffffffbf20
_ZN11QMetaObject8activateEP7QObjectiiPPv, FP=7fffffffc020
_ZN13QMdiSubWindow18windowStateChangedE6QFlagsIN2Qt11WindowStateEES3_, FP=7fffffffc070
_ZN13QMdiSubWindow11qt_metacastEPKc, FP=7fffffffc0d0
_ZN13QMdiSubWindow11qt_metacastEPKc, FP=7fffffffc120
_ZN11QMetaObject8activateEP7QObjectiiPPv, FP=7fffffffc220
_ZN12QApplication12focusChangedEP7QWidgetS1_, FP=7fffffffc260
_ZN19QApplicationPrivate14setFocusWidgetEP7QWidgetN2Qt11FocusReasonE, FP=7fffffffc2d0
_ZN7QWidget8setFocusEN2Qt11FocusReasonE, FP=7fffffffc330
_ZN7QWidget18focusNextPrevChildEb, FP=7fffffffc390
_ZN7QWidget18focusNextPrevChildEb, FP=7fffffffc3f0
_ZN7QWidget18focusNextPrevChildEb, FP=7fffffffc450
_ZN14QWidgetPrivate11hide_helperEv, FP=7fffffffc4c0
_ZN7QWidget10setVisibleEb, FP=7fffffffc510
_ZN6Qtitan20qtn_set_page_visibleEPNS_10RibbonPageEb, FP=7fffffffc530
_ZN6Qtitan9RibbonTab11setSelectedEb, FP=7fffffffc550
_ZN6Qtitan12RibbonTabBar11activateTabEPKNS_9RibbonTabE, FP=7fffffffc580
_ZN6Qtitan12RibbonTabBar15setCurrentIndexEi, FP=7fffffffc5a0
_ZN6Qtitan9RibbonTab7clickedEv, FP=7fffffffc5c0
_ZN6Qtitan9RibbonTab15mousePressEventEP11QMouseEvent, FP=7fffffffc5d0

As a solution we suggest, before making the tab visible, to set the focus on the clicked tab widget.
Last edit: 5 years 1 month ago by Armen.

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

More
5 years 1 month ago #2 by Developer Machines
Could you reproduce it in our example of Ribbon_Application? There is an editor that can be in focus when we click on the tab, then the focus remains on the editor. This is correct, i.e. we cannot reproduce the error. How to do it?

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

More
4 years 7 months ago #3 by Armen
The issue is not reproducible on ribbon application.
We workaround the issue as follow:
==== //src/qtitanribbon/4.17/linux64/src/ribbon/QtnRibbonPage.cpp#4 (text) ====
1283a1284
> page->setFocus();
Attachments:

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.126 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 )