Commit 3f56c7bd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Open Dialog button changes.

Use a ToolButton+Menu since Qt4.6 on Windows seems to have fixed this issue.
parent d1d7a626
......@@ -123,8 +123,7 @@ OpenDialog::OpenDialog( QWidget *parent,
openButtonMenu->addAction( qtr( "&Convert" ), this, SLOT( transcode() ) ,
QKeySequence( "Alt+C" ) );
ui.menuButton->setMenu( openButtonMenu );
ui.menuButton->setIcon( QIcon( ":/down_arrow" ) );
playButton->setMenu( openButtonMenu );
/* Add the three Buttons */
ui.buttonsBox->addButton( selectButton, QDialogButtonBox::AcceptRole );
......@@ -223,7 +222,6 @@ void OpenDialog::setMenuAction()
}
playButton->show();
selectButton->hide();
playButton->setDefault( true );
}
}
......
......@@ -102,7 +102,7 @@ private:
QStringList SeparateEntries( const QString& );
QPushButton *cancelButton, *selectButton;
QPushButton *playButton;
QToolButton *playButton;
void finish( bool );
......
......@@ -30,10 +30,10 @@
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="4">
<item row="0" column="0" colspan="3">
<widget class="QTabWidget" name="Tab"/>
</item>
<item row="1" column="0" colspan="4">
<item row="1" column="0" colspan="3">
<widget class="QCheckBox" name="advancedCheckBox">
<property name="toolTip">
<string>Show extended options</string>
......@@ -43,7 +43,7 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="4">
<item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="advancedFrame">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
......@@ -207,36 +207,21 @@
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QToolButton" name="menuButton">
<item row="3" column="2">
<widget class="QDialogButtonBox" name="buttonsBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="toolTip">
<string>Select play mode</string>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
<property name="standardButtons">
<set>QDialogButtonBox::NoButton</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="playButton">
<item row="3" column="1">
<widget class="QToolButton" name="playButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
......@@ -252,21 +237,8 @@
<property name="text">
<string>Play</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDialogButtonBox" name="buttonsBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::NoButton</set>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
</property>
</widget>
</item>
......@@ -281,7 +253,6 @@
<tabstop>slaveText</tabstop>
<tabstop>slaveBrowseButton</tabstop>
<tabstop>playButton</tabstop>
<tabstop>menuButton</tabstop>
<tabstop>buttonsBox</tabstop>
</tabstops>
<resources/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment