Mercurial > projects > qtd
comparison examples/layouts/basiclayouts/dialog.d @ 282:256ab6cb8e85
Signals look-up andNew syntax for connect. The old one will not work from now on. This will allow for the signals overload. Although changes are done for both D1 and D2 versions, D1 won't work because of compiler bugs. I am tired of waiting for fixes.
author | eldar |
---|---|
date | Fri, 16 Oct 2009 02:43:59 +0000 |
parents | 26036621830e |
children | 7a3c43424dca |
comparison
equal
deleted
inserted
replaced
281:7f2e3ffa1c33 | 282:256ab6cb8e85 |
---|---|
73 bigEditor = new QTextEdit; | 73 bigEditor = new QTextEdit; |
74 bigEditor.setPlainText(tr("This widget takes up all the remaining space in the top-level layout.")); | 74 bigEditor.setPlainText(tr("This widget takes up all the remaining space in the top-level layout.")); |
75 | 75 |
76 buttonBox = new QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel); | 76 buttonBox = new QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel); |
77 | 77 |
78 buttonBox.accepted.connect(&this.accept); | 78 connect!("accepted")(buttonBox, &this.accept); |
79 buttonBox.rejected.connect(&this.reject); | 79 connect!("rejected")(buttonBox, &this.reject); |
80 | 80 |
81 QVBoxLayout mainLayout = new QVBoxLayout; | 81 QVBoxLayout mainLayout = new QVBoxLayout; |
82 | 82 |
83 mainLayout.setMenuBar(menuBar); | 83 mainLayout.setMenuBar(menuBar); |
84 | 84 |
99 | 99 |
100 fileMenu = new QMenu(tr("&File"), this); | 100 fileMenu = new QMenu(tr("&File"), this); |
101 exitAction = fileMenu.addAction(tr("E&xit")); | 101 exitAction = fileMenu.addAction(tr("E&xit")); |
102 menuBar.addMenu(fileMenu); | 102 menuBar.addMenu(fileMenu); |
103 | 103 |
104 exitAction.triggered.connect(&this.accept); | 104 connect!("triggered")(exitAction, &this.accept); |
105 } | 105 } |
106 | 106 |
107 void createHorizontalGroupBox() | 107 void createHorizontalGroupBox() |
108 { | 108 { |
109 horizontalGroupBox = new QGroupBox(tr("Horizontal layout")); | 109 horizontalGroupBox = new QGroupBox(tr("Horizontal layout")); |