Forum
Sign Up

quick access bar - qactions not removed on clear?

8 years 9 months ago #1 by Matthias Zangl
I am using the following code

Qtitan::RibbonQuickAccessBar* pBar = m_pMainWnd->ribbonBar()->getQuickAccessBar();
if( pBar )
pBar->clear();

Though it removes the buttons from the toolbar, QActions remain in memory and are accessible via pBar->children().

Is this by intention? Am I using the wrong method to delete all actions?

thanks for your help,
Matthias

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

More
8 years 9 months ago #2 by Developer Machines
RibbonQuickAccessBar is the successor of QToolBar. Looks like what this problem is the restriction of Qt.

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

More
8 years 9 months ago #3 by Matthias Zangl
is there a better way to clear the QuickAccessBar at once?

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

More
8 years 8 months ago #4 by Developer Machines
There is no such mechanism in QtitanRibbon. This was done deliberately. QAction is a shared object so it can be displayed in several places. So if we destroyed this object using clear() method when AV or crash can happen elsewhere. For lifetime of this objects should watch yourself.

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 MachinesEduard
Time to create page: 0.130 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 )