如何在Qt Designer(1.3)中創建上下文菜單? 當然,我想創建它與寫出一行代碼!使用Qt Designer(Qt Creator IDE)創建上下文菜單
11
A
回答
-1
你唯一能做的就是設置contextMenuPolicy,但我懷疑它是你在找什麼。
12
你需要在Qt Designer中的兩個步驟,並在窗體的構造的幾行代碼:
設置你的widget的
contextMenuPolicy
的值ActionsContextMenu
。使用操作編輯器選項卡創建操作。
對於在Qt Designer創建的每一個動作,放線等形式構造如下:
ui->yourwidget->addAction(ui->youraction);
相關問題
- 1. Qt Creator Designer問題
- 2. Windows中的Qt Designer與Qt Creator
- 3. Qt Creator 2.8.1 Qt 5.1.1 Qt Designer Linux顯示新表格
- 4. 使用qt重新創建的Windows Shell上下文菜單
- 5. Qt QListView - 上下文菜單?
- 6. 使用C++/Qt的上下文菜單
- 7. Qt設計師vs Qt Quick Designer vs Qt Creator?
- 8. Qt Creator/Designer程序不顯示?
- 9. 從Qt Designer導入表單到我在Qt Creator中的項目
- 10. 如何在perl中使用Qt GUI(使用Qt Designer創建)?
- 11. 關於Qt Creator IDE UI
- 12. Qt Creator IDE AutoTest插件
- 13. Qt Creator如何用作通用C++ IDE(不使用Qt庫)?
- 14. 將QWT 6.0.1與Qt Creator/Designer集成4.8.0
- 15. Qt Designer - Qt 4.8.1
- 16. 創建菜單的Qt
- 17. 上下文菜單左鍵單擊Qt
- 18. 在Qt Creator中使用靜態Qt?
- 19. Qt使用菜單欄填充上下文菜單
- 20. 如何創建.pri文件,Qt Creator的
- 21. Qt Creator「無法創建文件(...)qtcreator.xml」(Mac)
- 22. 使用Qt Creator的git push
- 23. Qt - 如何在Qt Creator UI Designer中旋轉QLabel
- 24. Qt Creator下的Libqxt
- 25. 鏈接GUI創建菜單到SLOT Qt
- 26. Qt-creator使用dll
- 27. GNUstep的使用Qt Creator的
- 28. 使用cmake與Qt Creator的
- 29. 啓用Qt Creator在運行模式下創建核心文件?
- 30. Qt自定義上下文菜單
你能解釋一下你的解決方案? – 2010-05-03 07:39:41
簡而言之,這是不可能的。 – delor 2010-05-04 19:36:25