Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
514a5944
Commit
514a5944
authored
May 18, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: SimplePreferences: Don't use QButtonGroup (fix #8609)
parent
a42bb441
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+9
-6
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
514a5944
...
...
@@ -37,7 +37,7 @@
#include <QString>
#include <QFont>
#include <QToolButton>
#include <Q
ButtonGroup
>
#include <Q
SignalMapper
>
#include <QVBoxLayout>
#include <QScrollArea>
...
...
@@ -61,10 +61,11 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent, bool sma
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
();
QButtonGroup
*
buttonGroup
=
new
QButtonGroup
(
this
);
buttonGroup
->
setExclusive
(
true
);
CONNECT
(
buttonGroup
,
buttonClicked
(
int
),
this
,
switchPanel
(
int
)
);
/* Use autoExclusive buttons and a mapper as QButtonGroup can't
set focus (keys) when it manages the buttons's exclusivity.
See QT bugs 131 & 816 and QAbstractButton's source code. */
QSignalMapper
*
mapper
=
new
QSignalMapper
(
layout
);
CONNECT
(
mapper
,
mapped
(
int
),
this
,
switchPanel
(
int
)
);
short
icon_height
=
small
?
ICON_HEIGHT
/
2
:
ICON_HEIGHT
;
...
...
@@ -79,7 +80,9 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent, bool sma
button->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding) ; \
button->setAutoRaise( true ); \
button->setCheckable( true ); \
buttonGroup->addButton( button, numb ); \
button->setAutoExclusive( true ); \
CONNECT( button, clicked(), mapper, map() ); \
mapper->setMapping( button, numb ); \
layout->addWidget( button );
ADD_CATEGORY
(
SPrefsInterface
,
qtr
(
"Interface"
),
qtr
(
"Interface Settings"
),
...
...
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