Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to Get the Children of Tool Bar ?
QtWS25 Last Chance

How to Get the Children of Tool Bar ?

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    syedasadalibs03
    wrote on last edited by
    #1

    i am trying to get the name of the Tool Button that is in the Tool Bar to connect the Signals

    i have tried this, but it will not give the name of Control Can anyone tell, how to do that

    qDebug() << "My Static Tool Bar accessibleName"<<toolBar->accessibleName()
    qDebug() << "My Static Tool Bar accessibleDescription "<<toolBar->accessibleDescription() ;
    qDebug() << "My Static Tool Bar childAt "<<toolBar->childAt(20,600) ;
    qDebug() << "My Static Tool Bar children" << toolBar->children() ;

    Thanks in Advance.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tony
      wrote on last edited by
      #2

      Hi,

      I don't know if there's a way to access internal created ToolButton widgets on the toolbar. Anyway, I suggest to enumerate the actions related to the toolbar, and to connect signals there.

      T.

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        see if this helps:
        @
        QList<QToolButton *> buttonlist
        = myToolBar->findChildren<QToolButton *>();
        QListIterator<QToolButton *> i(buttonlist);
        while (i.hasNext())
        qDebug() << i.next();
        @

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved