View Full Version : QTableView->QDockWidget
ogre
1st February 2006, 14:30
Hello,
How can i add a QTableView in a QDockWidget?
Thx
zlatko
1st February 2006, 14:56
i think you must add QTableWidget that bound with your QTableView
yogeshm02
1st February 2006, 14:57
Hello,
How can i add a QTableView in a QDockWidget?
Thx
Just as you would add any other widget! Any more hints?
ogre
1st February 2006, 15:21
ok,
i've got it.
QDockWidget *dock = new QDockWidget(tr("Model"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
lb = new QTableView(dock);
QStandardItemModel *m = new QStandardItemModel(25, 5);
Tab_Model *delegate = new Tab_Model;
lb->setModel(m);
dock->setMaximumWidth( 327 );
dock->setWidget(lb);
addDockWidget(Qt::RightDockWidgetArea, dock);
thx
Powered by vBulletin® Version 4.2.5 Copyright © 2023 vBulletin Solutions Inc. All rights reserved.