Plasma
Go to the documentation of this file.
26#include <kiconloader.h>
28#include "private/style_p.h"
36 Plasma::Style::Ptr style;
41 d(new TreeViewPrivate)
43 QTreeView *native =
new QTreeView;
45 native->setWindowIcon(QIcon());
46 native->setAttribute(Qt::WA_NoSystemBackground);
47 native->setFrameStyle(QFrame::NoFrame);
49 d->style = Plasma::Style::sharedStyle();
50 native->verticalScrollBar()->setStyle(d->style.data());
51 native->horizontalScrollBar()->setStyle(d->style.data());
57 Plasma::Style::doneWithSharedStyle();
60void TreeView::setModel(QAbstractItemModel *model)
65QAbstractItemModel *TreeView::model()
70void TreeView::setStyleSheet(
const QString &stylesheet)
72 widget()->setStyleSheet(stylesheet);
75QString TreeView::styleSheet()
77 return widget()->styleSheet();
80QTreeView *TreeView::nativeWidget()
const
82 return static_cast<QTreeView*
>(widget());
87#include <treeview.moc>
QAbstractItemModel * model
Namespace for everything in libplasma.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by
doxygen 1.9.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.