summaryrefslogtreecommitdiffstats
path: root/demos
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 /demos
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 'demos')
-rw-r--r--demos/browser/browsermainwindow.cpp1
-rw-r--r--demos/textedit/textedit.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp
index 88abb6a..2a0138c 100644
--- a/demos/browser/browsermainwindow.cpp
+++ b/demos/browser/browsermainwindow.cpp
@@ -81,6 +81,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
, m_stop(0)
, m_reload(0)
{
+ setToolButtonStyle(Qt::ToolButtonSystemDefault);
setAttribute(Qt::WA_DeleteOnClose, true);
statusBar()->setSizeGripEnabled(true);
setupMenu();
diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp
index 5eee855..75a13a5 100644
--- a/demos/textedit/textedit.cpp
+++ b/demos/textedit/textedit.cpp
@@ -75,6 +75,7 @@ const QString rsrcPath = ":/images/win";
TextEdit::TextEdit(QWidget *parent)
: QMainWindow(parent)
{
+ setToolButtonStyle(Qt::ToolButtonSystemDefault);
setupFileActions();
setupEditActions();
setupTextActions();