Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Qyoto;
- namespace QyotoTest
- {
- class Program : QObject
- {
- private QMainWindow window;
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static int Main(string[] args)
- {
- return new Program().Exec(args);
- }
- private int Exec(string[] args)
- {
- new QApplication(args);
- window = new QMainWindow();
- QWidget centralWidget = new QWidget(window);
- QVBoxLayout layout = new QVBoxLayout(centralWidget);
- QPushButton b = new QPushButton("Test");
- layout.AddWidget(b);
- Connect(b, SIGNAL("clicked()"), this, SLOT("on_about1_activate()"));
- window.SetCentralWidget(layout);
- window.Show();
- return QApplication.Exec();
- }
- [Q_SLOT]
- private void on_about1_activate()
- {
- QObject qObject = Sender();
- QDialog dialog = new QDialog(window);
- dialog.Exec();
- }
- }
- }
Add Comment
Please, Sign In to add comment