• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

VIファイルから作成したLabVIEWバージョンを表示。by QtCreator(Mingw)


Commit MetaInfo

修訂2b02dba4eb0aba1f1b9bef00d5eac24c05d522aa (tree)
時間2011-07-21 22:26:27
作者arakaki <alucky4416@user...>
Commiterarakaki

Log Message

AddMenu File->Exit, Help->about, Help->aboutQt

Change Summary

差異

--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -152,3 +152,18 @@ void MainWindow::on_toolButton_clicked()
152152 ui->lineEdit_FilePath->setText(fileName);
153153 }
154154 }
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+}
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -26,6 +26,12 @@ private slots:
2626
2727 void on_toolButton_clicked();
2828
29+ void on_actionExit_triggered();
30+
31+ void on_actionAbout_triggered();
32+
33+ void on_actionAbout_Qt_triggered();
34+
2935 private:
3036 Ui::MainWindow *ui;
3137
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -107,6 +107,21 @@
107107 <height>19</height>
108108 </rect>
109109 </property>
110+ <widget class="QMenu" name="menuFile_F">
111+ <property name="title">
112+ <string>File(&amp;F)</string>
113+ </property>
114+ <addaction name="actionExit"/>
115+ </widget>
116+ <widget class="QMenu" name="menuHelp_H">
117+ <property name="title">
118+ <string>Help(&amp;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"/>
110125 </widget>
111126 <widget class="QToolBar" name="mainToolBar">
112127 <attribute name="toolBarArea">
@@ -116,6 +131,24 @@
116131 <bool>false</bool>
117132 </attribute>
118133 </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>
119152 </widget>
120153 <layoutdefault spacing="6" margin="11"/>
121154 <tabstops>