Results 1 to 2 of 2

Thread: SOLVED: Created Menubar in QMainWindow not showing after editing

  1. #1
    Join Date
    Nov 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Question SOLVED: Created Menubar in QMainWindow not showing after editing

    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
    Qt Code:
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <ui version="4.0">
    3. <class>MainWindow</class>
    4. <widget class="QMainWindow" name="MainWindow">
    5. <property name="geometry">
    6. <rect>
    7. <x>0</x>
    8. <y>0</y>
    9. <width>800</width>
    10. <height>600</height>
    11. </rect>
    12. </property>
    13. <property name="windowTitle">
    14. <string>MainWindow</string>
    15. </property>
    16. <widget class="QWidget" name="centralwidget"/>
    17. <widget class="QMenuBar" name="menubar">
    18. <property name="geometry">
    19. <rect>
    20. <x>0</x>
    21. <y>0</y>
    22. <width>800</width>
    23. <height>22</height>
    24. </rect>
    25. </property>
    26. <widget class="QMenu" name="menuRobbie">
    27. <property name="title">
    28. <string>robbie</string>
    29. </property>
    30. <addaction name="actionDenise"/>
    31. <addaction name="actionCylla"/>
    32. <addaction name="actionJack"/>
    33. <addaction name="actionGrace"/>
    34. </widget>
    35. <addaction name="menuRobbie"/>
    36. </widget>
    37. <widget class="QStatusBar" name="statusbar"/>
    38. <action name="actionDenise">
    39. <property name="text">
    40. <string>About</string>
    41. </property>
    42. </action>
    43. <action name="actionCylla">
    44. <property name="text">
    45. <string>Preferences</string>
    46. </property>
    47. </action>
    48. <action name="actionJack">
    49. <property name="text">
    50. <string>jack</string>
    51. </property>
    52. </action>
    53. <action name="actionGrace">
    54. <property name="text">
    55. <string>Quit</string>
    56. </property>
    57. </action>
    58. </widget>
    59. <resources/>
    60. <connections/>
    61. </ui>
    To copy to clipboard, switch view to plain text mode 

    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
    Qt Code:
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <ui version="4.0">
    3. <class>MainWindow</class>
    4. <widget class="QMainWindow" name="MainWindow">
    5. <property name="geometry">
    6. <rect>
    7. <x>0</x>
    8. <y>0</y>
    9. <width>800</width>
    10. <height>600</height>
    11. </rect>
    12. </property>
    13. <property name="windowTitle">
    14. <string>MainWindow</string>
    15. </property>
    16. <widget class="QWidget" name="centralwidget"/>
    17. <widget class="QMenuBar" name="menubar">
    18. <property name="geometry">
    19. <rect>
    20. <x>0</x>
    21. <y>0</y>
    22. <width>800</width>
    23. <height>22</height>
    24. </rect>
    25. </property>
    26. <widget class="QMenu" name="menuSyncSeries">
    27. <property name="title">
    28. <string>SyncSeries</string>
    29. </property>
    30. <addaction name="actionAbout"/>
    31. <addaction name="actionPreferences"/>
    32. <addaction name="actionQuit"/>
    33. </widget>
    34. <addaction name="menuSyncSeries"/>
    35. </widget>
    36. <widget class="QStatusBar" name="statusbar"/>
    37. <action name="actionDenise">
    38. <property name="text">
    39. <string>Denise</string>
    40. </property>
    41. </action>
    42. <action name="actionCylla">
    43. <property name="text">
    44. <string>Cylla</string>
    45. </property>
    46. </action>
    47. <action name="actionGrace">
    48. <property name="text">
    49. <string>Grace</string>
    50. </property>
    51. </action>
    52. <action name="actionJack">
    53. <property name="text">
    54. <string>Jack</string>
    55. </property>
    56. </action>
    57. <action name="actionAbout">
    58. <property name="text">
    59. <string>About</string>
    60. </property>
    61. </action>
    62. <action name="actionPreferences">
    63. <property name="text">
    64. <string>Preferences</string>
    65. </property>
    66. </action>
    67. <action name="actionQuit">
    68. <property name="text">
    69. <string>Quit</string>
    70. </property>
    71. </action>
    72. </widget>
    73. <resources/>
    74. <connections/>
    75. </ui>
    To copy to clipboard, switch view to plain text mode 

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

    Kind regards.
    Rob.
    Last edited by rvank; 12th November 2013 at 11:05. Reason: SOLVED

  2. #2
    Join Date
    Nov 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Thumbs up Re: Created Menubar in QMainWindow not showing after editing

    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.

Similar Threads

  1. Qt QML MenuBar and Menus not showing
    By adutzu89 in forum Newbie
    Replies: 2
    Last Post: 7th October 2013, 11:51
  2. Replies: 1
    Last Post: 30th December 2008, 13:28
  3. Replies: 6
    Last Post: 20th August 2008, 20:21
  4. Showing and hiding menubar
    By borges in forum Newbie
    Replies: 1
    Last Post: 23rd September 2007, 10:56
  5. Showing QMainWindow without showing a child QWidget
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2007, 09:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.