adding placeholder menu BEFORE the file menu

adding placeholder menu BEFORE the file menu

flynn666
Participant Participant
692 Views
4 Replies
Message 1 of 5

adding placeholder menu BEFORE the file menu

flynn666
Participant
Participant

i bought a very wide monitor (samsung chg 90). Everything is absolute fine with it, but because all menus start appear on the most left position the menus are for me too muc on the left side(see attached screenshot). So is there a way to add a "custom menu" (placeholder, with specified width) BERFORE the common FILE MENU so that all menus appear more in the middle of the mainmenubar? Would be a deal if someone could help me - i'm not familar with mel scripting!

 

sincerly peter

0 Likes
693 Views
4 Replies
Replies (4)
Message 2 of 5

mspeer
Consultant
Consultant

Hi!

 

I suggest to use Hotbox as it opens the menu directly at mouse position.

0 Likes
Message 3 of 5

asztalosdani
Participant
Participant

Hi!

 

A quick and dirty solution would be this:

dummy = PyQt4.QtGui.QMenu('                                                           ')
file_action = menu_bar_widget.actionAt(PyQt4.QtCore.QPoint(10, 1))
menu_bar_widget.insertMenu(file_action, dummy)
dummy.setEnabled(False)

Adjust the length by adding/removing spaces. Run this in a Python script editor.

0 Likes
Message 4 of 5

flynn666
Participant
Participant

...you solution helped me along time ago, but now (on maya 2018) i'm getting the following error:

 

Error: NameError: file <maya console> line 1: name 'PyQt4' is not defined # 

 

..i have absolut NO experience with coding, so any idea?

0 Likes
Message 5 of 5

asztalosdani
Participant
Participant

Hi,

 

replace both PyQt4 occurrences to PySide2.

0 Likes