Hey all
(1)I want the column thats being created when user clicks and item into the first Column of QColumnView to have a widget that;ll include labels and stuff...
I tried to do this by reimplementing the QColumnView just like the documentations says.
heres my class on my .h file
class MyColumn : public QColumnView
{
Q_OBJECT
public:
};
class MyColumn : public QColumnView
{
Q_OBJECT
public:
QAbstractItemView * createColumn ( const QModelIndex & index );
};
To copy to clipboard, switch view to plain text mode
here's the sample code in my .cpp file
{
frame->setMinimumSize(250,300);
frame->setMaximumSize(250,300);
//return QColumnView::createColumn(frame);
//return frame;
return MyColumn::createColumn(frame);
}
QAbstractItemView * MyColumn::createColumn ( const QModelIndex & index )
{
QFrame *frame = new QFrame();
frame->setMinimumSize(250,300);
frame->setMaximumSize(250,300);
//return QColumnView::createColumn(frame);
//return frame;
return MyColumn::createColumn(frame);
}
To copy to clipboard, switch view to plain text mode
and of course this gives me errors
oh and i have one more question.
(2) id like the vertical scrollbar that the first column has to be shown in the right end of QColumnView widget and when the user clicks an item the scrollbar to move in the left just when the items text is over so that the new column will fit in the space after the first column, without the need to create a second horizontal scrollbar in the bottom.
I hope ive made myself clear, thanks for any help
Bookmarks