Problem:
I have a custom Window Hint within QMainWindow, I need to place QMenuBar under a row of layout
This is how it looks now
And how it looks like in QtDesigner
Question:
How to place QMenuBar under custom task bar
First of all, there's no way to do this right in QtDesigner
I found a way to replace it by directly changing *.ui file
First step is to open *.ui file in text editor (I'm using PyCharm with *.xml extension)
Second step is look how grid layout works, basically it built like
HTML tag with few options like row
, column
, rowspan
, colspan
first two of them are position of the item and other two for positioning
Following step is to find our QMenuBar widget (my is on 142-154 lines)
copy and move on
Then we need to create a new item tag in layout tag
This is the beginning of layout tag, create a tag after it
Then add coordinates of QMenuBar that you want (mine is row="1" column="0" colspan="5")
And paste QMenuBar tag into it, then correct indentation
Now save the file and look at it in QtDesigner
Using PyUic reveals none problem