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
OpenFlipper-Free
OpenFlipper
Commits
249f5020
Commit
249f5020
authored
May 11, 2020
by
Jan
Browse files
Replaced obsolete grabWidget Call
parent
1f40e5b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
widgets/coreWidget/viewerControl.cc
View file @
249f5020
...
...
@@ -505,9 +505,10 @@ void CoreWidget::applicationSnapshotDialog() {
snapshotName_
=
newName
;
//grabs only the widget (espacially in windows)
//todo: deprecated in QT 5.0, use QScreen instead
QPixmap
pic
=
QPixmap
::
grabWindow
(
winId
()
);
dialog
.
hide
();
QScreen
*
screen
=
window
()
->
screen
();
QPixmap
pic
=
screen
->
grabWindow
(
winId
()
);
QPainter
painter
(
&
pic
);
...
...
@@ -534,8 +535,11 @@ void CoreWidget::applicationSnapshotDialog() {
///Take a snapshot of the whole application
void
CoreWidget
::
applicationSnapshot
()
{
QScreen
*
screen
=
window
()
->
screen
();
QPixmap
pix
=
screen
->
grabWindow
(
winId
()
);
// Write image asynchronously
QImage
*
pic
=
new
QImage
(
QPixmap
::
grabWindow
(
winId
()
)
.
toImage
());
QImage
*
pic
=
new
QImage
(
pix
.
toImage
());
writeImageAsynchronously
(
pic
,
suggestSnapshotFilename
(
snapshotName_
));
}
...
...
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