summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-07-16 19:00:45 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-07-16 19:12:29 (GMT)
commite1c019fd7ecaa59eee39f23434dd63d5656f4ee0 (patch)
tree52e299e2d6ecc0d32247f2ee2dafbba99350c3a3 /tools
parentca2122e9eb2b0d68d4203b05128f6fc5a838f3d6 (diff)
downloadQt-e1c019fd7ecaa59eee39f23434dd63d5656f4ee0.zip
Qt-e1c019fd7ecaa59eee39f23434dd63d5656f4ee0.tar.gz
Qt-e1c019fd7ecaa59eee39f23434dd63d5656f4ee0.tar.bz2
Allow picking up tool button style from the system
KDE and GNOME has the concept of a default tool button style that can be set system-wide. Qt currently allways default to IconOnly. I have added an optional Qt::ToolButtonSystemDefault value so you can opt-in to respect the system setting. We did not change the default because a lot of apps will look odd when for instance text is beside icons and the descriptive text is too long. Task-number: 237864 Reviewed-by: ogoffart
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 617ac4d..ae3f7bc 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -93,6 +93,8 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
, m_qtDocInstaller(0)
, m_connectedInitSignals(false)
{
+ setToolButtonStyle(Qt::ToolButtonSystemDefault);
+
if (usesDefaultCollection()) {
MainWindow::collectionFileDirectory(true);
m_helpEngine = new QHelpEngine(MainWindow::defaultHelpCollectionFileName(),
@@ -448,12 +450,14 @@ void MainWindow::setupActions()
menu = menuBar()->addMenu(tr("&Edit"));
m_copyAction = menu->addAction(tr("&Copy selected Text"), m_centralWidget,
SLOT(copySelection()));
+ m_copyAction->setIconText("&Copy");
m_copyAction->setIcon(QIcon(resourcePath + QLatin1String("/editcopy.png")));
m_copyAction->setShortcuts(QKeySequence::Copy);
m_copyAction->setEnabled(false);
m_findAction = menu->addAction(tr("&Find in Text..."), m_centralWidget,
SLOT(showTextSearch()));
+ m_findAction->setIconText("&Find");
m_findAction->setIcon(QIcon(resourcePath + QLatin1String("/find.png")));
m_findAction->setShortcuts(QKeySequence::Find);
@@ -513,6 +517,7 @@ void MainWindow::setupActions()
m_syncAction = menu->addAction(tr("Sync with Table of Contents"), this,
SLOT(syncContents()));
+ m_syncAction->setIconText("Sync");
m_syncAction->setIcon(QIcon(resourcePath + QLatin1String("/synctoc.png")));
menu->addSeparator();