itom
Loading...
Searching...
No Matches
TreeComboBox Class Reference

#include <treeComboBox.h>

Inheritance diagram for TreeComboBox:

Public Types

typedef QComboBox Superclass
 

Signals

void popupShow ()
 
void popupHide ()
 

Public Member Functions

 TreeComboBox (QWidget *parent=0)
 
int visibleModelColumn () const
 
void setVisibleModelColumn (int index)
 
virtual bool eventFilter (QObject *object, QEvent *event)
 
virtual void showPopup ()
 
virtual void hidePopup ()
 
QTreeView * treeView () const
 

Protected Slots

void resizePopup ()
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *)
 

Protected Attributes

QScopedPointer< TreeComboBoxPrivated_ptr
 

Properties

int visibleModelColumn
 

Private Member Functions

 Q_DECLARE_PRIVATE (TreeComboBox)
 
 Q_DISABLE_COPY (TreeComboBox)
 

Detailed Description

Description: ComboBox that displays the items as a tree view. See below for a use case: TreeComboBox combo; QStandardItemModel model; model.appendRow(new QStandardItem("Test1")); model.item(0)->appendRow(new QStandardItem("Test1.1")); model.item(0)->appendRow(new QStandardItem("Test1.2")); model.item(0)->appendRow(new QStandardItem("Test1.3")); model.appendRow(new QStandardItem("Test2")); model.appendRow(new QStandardItem("Test3")); combo.setModel(&model); combo.show(); TODO fix size of the view

Member Function Documentation

◆ treeView()

QTreeView * TreeComboBox::treeView ( ) const

TreeComboBox uses a QTreeView for its model view. treeView() is a utility function that cast QComboBox::view() into a QTreeView.

See also
view()

Property Documentation

◆ visibleModelColumn

int TreeComboBox::visibleModelColumn
readwrite

Column index visible in the view. If

See also
visibleModelColumn is -1 (default) then all columns are visible.

The documentation for this class was generated from the following files: