PDA

View Full Version : Qt Designer SOLVED: Created Menubar in QMainWindow not showing after editing



rvank
12th November 2013, 08:32
Hi All,

I have a strange problem. I'm trying to design a main window for my python app, but the menu i create does not show when i try the preview function in QT Designer (using QT 4.8.5)
I am working on OSX Mavericks.

If i make a clean main window and i add a menu title and some items in that menu the menu does not always show up or shows only some of the menu items.
I seems like if i have ever used that menu name that it will work or not.
I just created a new main window and a menu called robbie with the items denise, cylla, jack and grace, preview shows the correct menu
I saved it in the project folder of my app, and preview still shows the correct menu
I changed the menu items denise into About, cylla into Preferences and grace into Quit.
When i now do a preview of my form i get the menu with only the item jack. the only item i did not change.

This is the contents of my saved window layout

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuRobbie">
<property name="title">
<string>robbie</string>
</property>
<addaction name="actionDenise"/>
<addaction name="actionCylla"/>
<addaction name="actionJack"/>
<addaction name="actionGrace"/>
</widget>
<addaction name="menuRobbie"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionDenise">
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionCylla">
<property name="text">
<string>Preferences</string>
</property>
</action>
<action name="actionJack">
<property name="text">
<string>jack</string>
</property>
</action>
<action name="actionGrace">
<property name="text">
<string>Quit</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>


I created a new main window and created the same menu with the same items, all showed up correctly in preview, then i deleted the menu and created a new one called SyncSeries with the items About, Preferences and Quit.
When i now do a preview the whole menu does not show up.

Below is the contents of the save window

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuSyncSeries">
<property name="title">
<string>SyncSeries</string>
</property>
<addaction name="actionAbout"/>
<addaction name="actionPreferences"/>
<addaction name="actionQuit"/>
</widget>
<addaction name="menuSyncSeries"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionDenise">
<property name="text">
<string>Denise</string>
</property>
</action>
<action name="actionCylla">
<property name="text">
<string>Cylla</string>
</property>
</action>
<action name="actionGrace">
<property name="text">
<string>Grace</string>
</property>
</action>
<action name="actionJack">
<property name="text">
<string>Jack</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionPreferences">
<property name="text">
<string>Preferences</string>
</property>
</action>
<action name="actionQuit">
<property name="text">
<string>Quit</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>


I hope that there is somebody here that can tell me what is happening and how to prevent/correct this.

Kind regards.
Rob.

rvank
12th November 2013, 11:04
After i posted the question here i found an other Qt forum and posted the question there too.

http://qt-project.org/forums/viewthread/34751/ is the link to that topic with the answer to my problem.

Rob.