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
Games
Kajongg
Commits
bda0f4f7
Commit
bda0f4f7
authored
May 06, 2021
by
Wolfgang Rohdewald
Browse files
Pyside2 does not have len(QListWidget), use count() instead
parent
0f76f7a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kdestub.py
View file @
bda0f4f7
...
...
@@ -1219,13 +1219,13 @@ class KConfigDialog(KDialog):
self
.
iconList
.
addItem
(
item
)
self
.
tabSpace
.
addWidget
(
configTab
)
self
.
iconList
.
setIconSize
(
QSize
(
80
,
80
))
icons
=
[
self
.
iconList
.
item
(
x
)
for
x
in
range
(
len
(
self
.
iconList
))]
icons
=
[
self
.
iconList
.
item
(
x
)
for
x
in
range
(
self
.
iconList
.
count
(
))]
neededIconWidth
=
max
(
self
.
iconList
.
visualItemRect
(
x
).
width
()
for
x
in
icons
)
margins
=
self
.
iconList
.
contentsMargins
()
neededIconWidth
+=
margins
.
left
()
+
margins
.
right
()
self
.
iconList
.
setFixedWidth
(
neededIconWidth
)
self
.
iconList
.
setMinimumHeight
(
120
*
len
(
self
.
iconList
))
self
.
iconList
.
setMinimumHeight
(
120
*
self
.
iconList
.
count
(
))
for
child
in
self
.
allChildren
(
self
):
self
.
configWidgets
[
child
.
objectName
().
replace
(
'kcfg_'
,
''
)]
=
child
...
...
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