Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サブメニューを保持する QMenu があります。たとえば、各メニュー タイトル文字列を動的に更新できるようにしたいのですが、このメニューがあります。
[main menu ] Groups 2 [sub menu] group_X 3 [sub menu] group_Y 1
アプリケーションから各メニュー エントリの文字列の数字部分のみを変更できるようにしたいのですが、どのアプローチを参照すればよいですか?
タイトルを設定する
menu -> setTitle (tr ("Number %1") .arg (123));