Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Leander Schulten
Lichtsteuerung
Commits
6d0a921b
Commit
6d0a921b
authored
Oct 22, 2018
by
Leander Schulten
Browse files
Add clear function to the Modelvector
parent
357d8fa6
Changes
1
Hide whitespace changes
Inline
Side-by-side
modelvector.h
View file @
6d0a921b
...
@@ -173,6 +173,15 @@ public:
...
@@ -173,6 +173,15 @@ public:
typename
std
::
vector
<
Type
>::
reference
back
(){
typename
std
::
vector
<
Type
>::
reference
back
(){
return
model
.
back
();
return
model
.
back
();
}
}
void
clear
(){
if
(
size
()
==
0
){
return
;
}
beginRemoveRows
(
QModelIndex
(),
0
,
size
()
-
1
);
model
.
clear
();
endRemoveRows
();
}
};
};
#endif // MODELVECTOR_H
#endif // MODELVECTOR_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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