Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Kig
Commits
df57c290
Commit
df57c290
authored
Jul 15, 2022
by
Laurent Montel
Browse files
Add parent, remove setLayout method
parent
9561f421
Pipeline
#205713
passed with stage
in 7 minutes and 3 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
misc/kigcoordinateprecisiondialog.cpp
View file @
df57c290
...
...
@@ -18,8 +18,7 @@ KigCoordinatePrecisionDialog::KigCoordinatePrecisionDialog(bool isUserSpecified,
ui
=
new
Ui
::
KigCoordinatePrecisionDialog
();
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
addWidget
(
mainWidget
);
mainLayout
->
addWidget
(
buttonBox
);
ui
->
setupUi
(
mainWidget
);
...
...
modes/edittype.cc
View file @
df57c290
...
...
@@ -27,8 +27,7 @@ EditType::EditType( QWidget* parent, const QString& name, const QString& desc,
setWindowTitle
(
i18nc
(
"@title:window"
,
"Edit Type"
)
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
...
...
modes/historydialog.cc
View file @
df57c290
...
...
@@ -26,18 +26,15 @@ HistoryDialog::HistoryDialog( QUndoStack* kch, QWidget* parent )
setWindowTitle
(
i18nc
(
"@title:window"
,
"History Browser"
)
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
addWidget
(
mainWidget
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
QDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
QDialog
::
reject
);
//PORTING SCRIPT: WARNING mainLayout->addWidget(buttonBox) must be last item in layout. Please move it.
mainLayout
->
addWidget
(
buttonBox
);
QWidget
*
main
=
new
QWidget
(
this
);
mwidget
=
new
Ui_HistoryWidget
();
mwidget
->
setupUi
(
main
);
//PORTING: Verify that widget was added to mainLayout setMainWidget( main );
mtotalsteps
=
mch
->
count
()
+
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment