Menu and action not showing up in application
-
Env: Mac and Linux
Qt version: 5.4.1 (Clang 6.0 (Apple), 64 bit)
Built on Apr 22 2015 04:13:25
From revision 6302a28c97I was working on the app. At one point (not sure how it happened), I added the 17th action in Designer named action_link and drug it to the toolbar in MainWindow.ui. When I ran the app, it didn't show. Then I added an Edit menu and drug the action to that menu. Neither the Edit menu nor the action showed up. Code completion for ui->action_link doesn't work and when I compile, I get a compiler error. The following is my .pro and Resource.qrc files. I can add the mainwindow.ui file, but it's pretty big now. Anybody see what's wrong in these files? Seems like one of the project, resource or gui files may be corrupt.
BibleHubApp.pro
#-------------------------------------------------#Project created by QtCreator 2015-05-20T16:59:33****
#-------------------------------------------------
QT += core gui network webkit webkitwidgets xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = BibleHubApp
TEMPLATE = appRESOURCES = Resources.qrc
SOURCES += main.cpp
mainwindow.cpp
treeviewitemmodel.cppHEADERS += mainwindow.h
treeviewitemmodel.hFORMS += mainwindow.ui
Resources.qrc
<RCC>
<qresource prefix="/">
<file>Resources/ParallelChapters.png</file>
<file>Resources/CrossReferences.png</file>
<file>Resources/ChainReferences.png</file>
<file>Resources/BibleIllustrators.png</file>
<file>Resources/PulpitCommentary.png</file>
<file>Resources/Pictures.png</file>
<file>Resources/TreasuryScriptureKnowledge.png</file>
<file>Resources/BookSummary.png</file>
<file>Resources/ChapterOutline.png</file>
<file>Resources/Timeline.png</file>
<file>Resources/Library.png</file>
<file>Resources/PrinterFriendly.png</file>
<file>Resources/ShareOnFacebook.png</file>
<file>Resources/ShareOnGooglePlus.png</file>
<file>Resources/TweetThis.png</file>
<file>Resources/link-icon.png</file>
</qresource>
</RCC> -
Here's the mainwindow.ui file. Sorry it's so big. Also, I cleaned, qmake'd and built several times.
<?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>943</width>
<height>633</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeView" name="treeView">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="tabsClosable">
<bool>true</bool>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Bible Hub</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QWebView" name="webView">
<property name="url">
<url>
<string>http://biblehub.com/</string>
</url>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>943</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
<property name="title">
<string>&File</string>
</property>
<addaction name="action_Quit"/>
</widget>
<widget class="QMenu" name="menu">
<property name="title">
<string>&</string>
</property>
<addaction name="action_Edit"/>
</widget>
<widget class="QMenu" name="menu_Edit">
<property name="title">
<string>&Edit</string>
</property>
</widget>
<addaction name="menu_File"/>
<addaction name="menu"/>
<addaction name="menu_Edit"/>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="action_parallel_chapters"/>
<addaction name="action_cross_references"/>
<addaction name="action_chain_references"/>
<addaction name="action_bible_illustrators"/>
<addaction name="action_pulpit_commentary"/>
<addaction name="action_pictures"/>
<addaction name="action_treasury_of_Scripture_Knowledge"/>
<addaction name="action_book_Summary"/>
<addaction name="action_chapter_Outline"/>
<addaction name="action_timeline"/>
<addaction name="action_library"/>
<addaction name="action_printer_Friendly_Text"/>
<addaction name="action_share_on_Facebook"/>
<addaction name="action_share_on_Google_Plus"/>
<addaction name="action_tweet_Verse"/>
<addaction name="action_link"/>
</widget>
<action name="action_Quit">
<property name="text">
<string>&Quit</string>
</property>
</action>
<action name="action_parallel_chapters">
<property name="icon">
<iconset resource="Resources.qrc">
<normaloff>:/Resources/ParallelChapters.png</normaloff>:/Resources/ParallelChapters.png</iconset>
</property>
<property name="text">
<string>Parallel Chapters</string>
</property>
<property name="toolTip">
<string>Parallel Chapters</string>
</property>
</action>
<action name="action_cross_references">
<property name="icon">
<iconset>
<normalon>:/Resources/CrossReferences.png</normalon>
</iconset>
</property>
<property name="text">
<string>Cross References</string>
</property>
<property name="toolTip">
<string>Cross References</string>
</property>
</action>
<action name="action_chain_references">
<property name="icon">
<iconset>
<normalon>:/Resources/ChainReferences.png</normalon>
</iconset>
</property>
<property name="text">
<string>Chain References</string>
</property>
</action>
<action name="action_bible_illustrators">
<property name="icon">
<iconset>
<normalon>:/Resources/BibleIllustrators.png</normalon>
</iconset>
</property>
<property name="text">
<string>Bible Illustrators</string>
</property>
</action>
<action name="action_pulpit_commentary">
<property name="icon">
<iconset>
<normalon>:/Resources/PulpitCommentary.png</normalon>
</iconset>
</property>
<property name="text">
<string>Pulpit Commentary</string>
</property>
<property name="toolTip">
<string>Pulpit Commentary</string>
</property>
</action>
<action name="action_pictures">
<property name="icon">
<iconset>
<normalon>:/Resources/Pictures.png</normalon>
</iconset>
</property>
<property name="text">
<string>Pictures</string>
</property>
<property name="toolTip">
<string>Pictures</string>
</property>
</action>
<action name="action_treasury_of_Scripture_Knowledge">
<property name="icon">
<iconset>
<normalon>:/Resources/TreasuryScriptureKnowledge.png</normalon>
</iconset>
</property>
<property name="text">
<string>Treasury of Scripture Knowledge</string>
</property>
<property name="toolTip">
<string>Treasury of Scripture Knowledge</string>
</property>
</action>
<action name="action_book_Summary">
<property name="icon">
<iconset>
<normalon>:/Resources/BookSummary.png</normalon>
</iconset>
</property>
<property name="text">
<string>Book Summary</string>
</property>
<property name="toolTip">
<string>Book Summary</string>
</property>
</action>
<action name="action_chapter_Outline">
<property name="icon">
<iconset>
<normalon>:/Resources/ChapterOutline.png</normalon>
</iconset>
</property>
<property name="text">
<string>Chapter Outline</string>
</property>
<property name="toolTip">
<string>Chapter Outline</string>
</property>
</action>
<action name="action_timeline">
<property name="icon">
<iconset>
<normalon>:/Resources/Timeline.png</normalon>
</iconset>
</property>
<property name="text">
<string>Timeline</string>
</property>
</action>
<action name="action_library">
<property name="icon">
<iconset>
<normalon>:/Resources/Library.png</normalon>
</iconset>
</property>
<property name="text">
<string>Library</string>
</property>
<property name="toolTip">
<string>Library</string>
</property>
</action>
<action name="action_printer_Friendly_Text">
<property name="icon">
<iconset>
<normalon>:/Resources/PrinterFriendly.png</normalon>
</iconset>
</property>
<property name="text">
<string>Printer Friendly Text</string>
</property>
<property name="toolTip">
<string>Printer Friendly Text</string>
</property>
</action>
<action name="action_share_on_Facebook">
<property name="icon">
<iconset>
<normalon>:/Resources/ShareOnFacebook.png</normalon>
</iconset>
</property>
<property name="text">
<string>Share on Facebook</string>
</property>
<property name="toolTip">
<string>Share on Facebook</string>
</property>
</action>
<action name="action_share_on_Google_Plus">
<property name="icon">
<iconset>
<normalon>:/Resources/ShareOnGooglePlus.png</normalon>
</iconset>
</property>
<property name="text">
<string>Share on Google Plus</string>
</property>
<property name="toolTip">
<string>Share this verse on Google Plus</string>
</property>
</action>
<action name="action_tweet_Verse">
<property name="icon">
<iconset>
<normalon>:/Resources/TweetThis.png</normalon>
</iconset>
</property>
<property name="text">
<string>Tweet Verse</string>
</property>
<property name="toolTip">
<string>Tweet This Verse</string>
</property>
</action>
<action name="action_link">
<property name="icon">
<iconset>
<normalon>:/Resources/link-icon.png</normalon>
</iconset>
</property>
<property name="text">
<string>Link</string>
</property>
<property name="toolTip">
<string>Link this page to a URL or file</string>
</property>
</action>
<action name="action_Edit">
<property name="text">
<string>&Edit</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QWebView</class>
<extends>QWidget</extends>
<header>QtWebKitWidgets/QWebView</header>
</customwidget>
</customwidgets>
<resources>
<include location="Resources.qrc"/>
</resources>
<connections/>
</ui> -
More info...
Running make clean, then qmake, then make from the command line works, but when I add new menu items from Designer, they don't show up until I repeat the clean, qmake and make again from the command line.