-
-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context Menu operations on Folder as Workspace tree #556
base: master
Are you sure you want to change the base?
Changes from 7 commits
882066c
08a04c9
45fcfcb
fe945df
58dbd4c
135b880
799ad73
c936ab4
5885f46
0ed5f25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,19 +27,81 @@ | |
<property name="bottomMargin"> | ||
<number>0</number> | ||
</property> | ||
<item> | ||
<widget class="QMenu" name="menuFile"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can QtCreator create a QMenu in the ui file? or some other method (e.g. manually)? I'm just interested since I've never seen this done before :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can't. I googled for it but at least Qt 5 can't. For me it looks like minor inconvenience everyone accustomed to. |
||
<property name="title"> | ||
<string>File Menu</string> | ||
</property> | ||
<addaction name="actionRename"/> | ||
<addaction name="actionMoveToTrash"/> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QMenu" name="menuDirectory"> | ||
<property name="title"> | ||
<string>Folder Menu</string> | ||
</property> | ||
<addaction name="actionRename"/> | ||
<addaction name="actionMoveToTrash"/> | ||
<addaction name="separator"/> | ||
<addaction name="actionNewFolder"/> | ||
<addaction name="actionSaveHere"/> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QMenu" name="menuEmpty"> | ||
<property name="title"> | ||
<string>Space Menu</string> | ||
</property> | ||
<addaction name="actionNewFolder"/> | ||
<addaction name="actionSaveHere"/> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QTreeView" name="treeView"> | ||
<property name="contextMenuPolicy"> | ||
<enum>Qt::CustomContextMenu</enum> | ||
</property> | ||
<property name="frameShape"> | ||
<enum>QFrame::NoFrame</enum> | ||
</property> | ||
<property name="editTriggers"> | ||
<set>QAbstractItemView::EditKeyPressed</set> | ||
</property> | ||
<attribute name="headerVisible"> | ||
<bool>false</bool> | ||
</attribute> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<action name="actionSaveHere"> | ||
<property name="text"> | ||
<string>&Save Current File Here</string> | ||
</property> | ||
</action> | ||
<action name="actionNewFolder"> | ||
<property name="text"> | ||
<string>New &Folder</string> | ||
</property> | ||
</action> | ||
<action name="actionRename"> | ||
<property name="text"> | ||
<string>&Rename</string> | ||
</property> | ||
</action> | ||
<action name="actionMoveToTrash"> | ||
<property name="icon"> | ||
<iconset resource="../resources.qrc"> | ||
<normaloff>:/icons/bin_closed.png</normaloff>:/icons/bin_closed.png</iconset> | ||
</property> | ||
<property name="text"> | ||
<string>Move to &Trash</string> | ||
</property> | ||
</action> | ||
</widget> | ||
<resources/> | ||
<resources> | ||
<include location="../resources.qrc"/> | ||
</resources> | ||
<connections/> | ||
</ui> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you closing current file? One could open one file and delete another one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right! Good catch! 😄 This is what I get for trying to modify it on little sleep.