Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dap-ui-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dap
dap-ui-sdk
Commits
ddb205b3
Commit
ddb205b3
authored
4 years ago
by
konstantin.kukharenko
Browse files
Options
Downloads
Patches
Plain Diff
[*]fixed bug
parent
6c875be6
No related branches found
No related tags found
1 merge request
!225
Pubtest bugs 4562
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ui/controls/WidgetInputSizeController.cpp
+16
-8
16 additions, 8 deletions
ui/controls/WidgetInputSizeController.cpp
ui/controls/WidgetInputSizeController.h
+2
-1
2 additions, 1 deletion
ui/controls/WidgetInputSizeController.h
with
18 additions
and
9 deletions
ui/controls/WidgetInputSizeController.cpp
+
16
−
8
View file @
ddb205b3
...
@@ -3,15 +3,23 @@
...
@@ -3,15 +3,23 @@
WidgetInputSizeController
::
WidgetInputSizeController
(
QObject
*
a_parent
)
WidgetInputSizeController
::
WidgetInputSizeController
(
QObject
*
a_parent
)
:
QObject
(
a_parent
)
:
QObject
(
a_parent
)
{
{
connect
(
QApplication
::
inputMethod
(),
&
QInputMethod
::
keyboardRectangleChanged
,[
=
]{
connect
(
QApplication
::
inputMethod
(),
&
QInputMethod
::
keyboardRectangleChanged
,
this
,
&
WidgetInputSizeController
::
setVisibilityWidgetDependingOnStateKeyboard
);
if
(
QApplication
::
inputMethod
()
->
isVisible
()
&&
QApplication
::
inputMethod
()
->
keyboardRectangle
().
height
()
==
0.0
)
}
{
setVisibleWidgets
(
true
);
if
(
parent
()
!=
nullptr
)
WidgetInputSizeController
::~
WidgetInputSizeController
()
qobject_cast
<
QWidget
*>
(
parent
())
->
setFocus
();
{
}
disconnect
(
QApplication
::
inputMethod
(),
&
QInputMethod
::
keyboardRectangleChanged
,
this
,
&
WidgetInputSizeController
::
setVisibilityWidgetDependingOnStateKeyboard
);
});
}
void
WidgetInputSizeController
::
setVisibilityWidgetDependingOnStateKeyboard
()
{
if
(
QApplication
::
inputMethod
()
->
isVisible
()
&&
QApplication
::
inputMethod
()
->
keyboardRectangle
().
height
()
==
0.0
)
{
setVisibleWidgets
(
true
);
if
(
parent
()
!=
nullptr
)
qobject_cast
<
QWidget
*>
(
parent
())
->
setFocus
();
}
}
}
void
WidgetInputSizeController
::
addWidgetEmitsSignal
(
CustomLineEditBase
*
a_widget
)
void
WidgetInputSizeController
::
addWidgetEmitsSignal
(
CustomLineEditBase
*
a_widget
)
...
...
This diff is collapsed.
Click to expand it.
ui/controls/WidgetInputSizeController.h
+
2
−
1
View file @
ddb205b3
...
@@ -15,7 +15,7 @@ class WidgetInputSizeController : public QObject
...
@@ -15,7 +15,7 @@ class WidgetInputSizeController : public QObject
Q_OBJECT
Q_OBJECT
public:
public:
WidgetInputSizeController
(
QObject
*
a_parent
);
WidgetInputSizeController
(
QObject
*
a_parent
);
~
WidgetInputSizeController
();
/// Adds widgets that should disappear/appear.
/// Adds widgets that should disappear/appear.
void
addDisappearingWidget
(
QWidget
*
a_widget
);
void
addDisappearingWidget
(
QWidget
*
a_widget
);
...
@@ -28,6 +28,7 @@ private:
...
@@ -28,6 +28,7 @@ private:
QList
<
QWidget
*>
m_disappearingWidget
;
QList
<
QWidget
*>
m_disappearingWidget
;
private
slots
:
private
slots
:
void
setVisibleWidgets
(
bool
a_visible
);
void
setVisibleWidgets
(
bool
a_visible
);
void
setVisibilityWidgetDependingOnStateKeyboard
();
};
};
#endif // WIDGETINPUTSIZECONTROLLER_H
#endif // WIDGETINPUTSIZECONTROLLER_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment