Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
c5ad22aa
Commit
c5ad22aa
authored
Jun 24, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set SearchBox minimum height based on its attached widgets
parent
12f84faf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
searchbox.py
blink/widgets/searchbox.py
+6
-1
No files found.
blink/widgets/searchbox.py
View file @
c5ad22aa
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#
#
from
PyQt4.QtCore
import
Qt
from
PyQt4.QtCore
import
Qt
from
PyQt4.QtGui
import
QAbstractButton
,
QPainter
,
QPalette
,
QPixmap
,
Q
Widget
from
PyQt4.QtGui
import
QAbstractButton
,
QPainter
,
QPalette
,
QPixmap
,
Q
Style
,
QWidget
,
QStyleOptionFrameV2
from
blink.resources
import
Resources
from
blink.resources
import
Resources
from
blink.widgets.lineedit
import
LineEdit
from
blink.widgets.lineedit
import
LineEdit
...
@@ -87,6 +87,11 @@ class SearchBox(LineEdit):
...
@@ -87,6 +87,11 @@ class SearchBox(LineEdit):
self
.
clear_button
=
ClearButton
(
self
)
self
.
clear_button
=
ClearButton
(
self
)
self
.
addHeadWidget
(
self
.
search_icon
)
self
.
addHeadWidget
(
self
.
search_icon
)
self
.
addTailWidget
(
self
.
clear_button
)
self
.
addTailWidget
(
self
.
clear_button
)
option
=
QStyleOptionFrameV2
()
self
.
initStyleOption
(
option
)
frame_width
=
self
.
style
()
.
pixelMetric
(
QStyle
.
PM_DefaultFrameWidth
,
option
,
self
)
widgets_height
=
max
(
self
.
search_icon
.
minimumHeight
(),
self
.
clear_button
.
minimumHeight
())
self
.
setMinimumHeight
(
widgets_height
+
2
+
2
*
frame_width
)
self
.
clear_button
.
hide
()
self
.
clear_button
.
hide
()
self
.
clear_button
.
clicked
.
connect
(
self
.
clear
)
self
.
clear_button
.
clicked
.
connect
(
self
.
clear
)
self
.
textChanged
.
connect
(
self
.
text_changed
)
self
.
textChanged
.
connect
(
self
.
text_changed
)
...
...
Write
Preview
Markdown
is supported
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