
VIファイルから作成したLabVIEWバージョンを表示。by QtCreator(Mingw)
| Revision | 2b02dba4eb0aba1f1b9bef00d5eac24c05d522aa (tree) |
|---|---|
| Time | 2011-07-21 22:26:27 |
| Author | arakaki <alucky4416@user...> |
| Commiter | arakaki |
AddMenu File->Exit, Help->about, Help->aboutQt
| @@ -152,3 +152,18 @@ void MainWindow::on_toolButton_clicked() | ||
| 152 | 152 | ui->lineEdit_FilePath->setText(fileName); |
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | + | |
| 156 | +void MainWindow::on_actionExit_triggered() | |
| 157 | +{ | |
| 158 | + close(); | |
| 159 | +} | |
| 160 | + | |
| 161 | +void MainWindow::on_actionAbout_triggered() | |
| 162 | +{ | |
| 163 | + QMessageBox::about(this, "About", tr("Get VI Version v0.1")); | |
| 164 | +} | |
| 165 | + | |
| 166 | +void MainWindow::on_actionAbout_Qt_triggered() | |
| 167 | +{ | |
| 168 | + QApplication::aboutQt(); | |
| 169 | +} |
| @@ -26,6 +26,12 @@ private slots: | ||
| 26 | 26 | |
| 27 | 27 | void on_toolButton_clicked(); |
| 28 | 28 | |
| 29 | + void on_actionExit_triggered(); | |
| 30 | + | |
| 31 | + void on_actionAbout_triggered(); | |
| 32 | + | |
| 33 | + void on_actionAbout_Qt_triggered(); | |
| 34 | + | |
| 29 | 35 | private: |
| 30 | 36 | Ui::MainWindow *ui; |
| 31 | 37 |
| @@ -107,6 +107,21 @@ | ||
| 107 | 107 | <height>19</height> |
| 108 | 108 | </rect> |
| 109 | 109 | </property> |
| 110 | + <widget class="QMenu" name="menuFile_F"> | |
| 111 | + <property name="title"> | |
| 112 | + <string>File(&F)</string> | |
| 113 | + </property> | |
| 114 | + <addaction name="actionExit"/> | |
| 115 | + </widget> | |
| 116 | + <widget class="QMenu" name="menuHelp_H"> | |
| 117 | + <property name="title"> | |
| 118 | + <string>Help(&H)</string> | |
| 119 | + </property> | |
| 120 | + <addaction name="actionAbout"/> | |
| 121 | + <addaction name="actionAbout_Qt"/> | |
| 122 | + </widget> | |
| 123 | + <addaction name="menuFile_F"/> | |
| 124 | + <addaction name="menuHelp_H"/> | |
| 110 | 125 | </widget> |
| 111 | 126 | <widget class="QToolBar" name="mainToolBar"> |
| 112 | 127 | <attribute name="toolBarArea"> |
| @@ -116,6 +131,24 @@ | ||
| 116 | 131 | <bool>false</bool> |
| 117 | 132 | </attribute> |
| 118 | 133 | </widget> |
| 134 | + <action name="actionExit"> | |
| 135 | + <property name="text"> | |
| 136 | + <string>Exit</string> | |
| 137 | + </property> | |
| 138 | + <property name="shortcut"> | |
| 139 | + <string>Ctrl+Q</string> | |
| 140 | + </property> | |
| 141 | + </action> | |
| 142 | + <action name="actionAbout"> | |
| 143 | + <property name="text"> | |
| 144 | + <string>about</string> | |
| 145 | + </property> | |
| 146 | + </action> | |
| 147 | + <action name="actionAbout_Qt"> | |
| 148 | + <property name="text"> | |
| 149 | + <string>about Qt</string> | |
| 150 | + </property> | |
| 151 | + </action> | |
| 119 | 152 | </widget> |
| 120 | 153 | <layoutdefault spacing="6" margin="11"/> |
| 121 | 154 | <tabstops> |