Guest User

Untitled

a guest
Aug 28th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1.                 else if (QToolButton* button = qobject_cast<QToolButton*>(w))
  2.                 {
  3.                     if (!strTipText.isEmpty())
  4.                         strTipText.remove(QChar('&'));
  5.  
  6.                     icon = button->icon();
  7.                     QString str = button->text();
  8.                     str.remove(QChar('&'));
  9.                     if (strTipText != str)
  10.                         strTitleText = str;
  11.  
  12.                     QAction * defAction = button->defaultAction();
  13.                     if ( defAction )
  14.                     {
  15.                         QKeySequence keyShortcut = defAction->shortcut();
  16.                         QString strShortcutString = keyShortcut.toString();
  17.                         strTitleText += " (" + strShortcutString + ")";
  18.                     }
  19.                 }
Advertisement
Add Comment
Please, Sign In to add comment