[Qt-interest] DockWidget population using QGoxLayout or QGridLayout problem with Qt::Alignment
S. Aguinaga
sa_jr at yahoo.com
Thu Dec 11 07:07:50 CET 2008
Hello Folks:
I'm trying to add buttons, checkboxes, etc. to Bottom DockWidget. I can add a QHBoxLayouts, but when I want to add 2 QHBoxLayouts I run into an error that I can't figure out.
The error is:
error: no matching function for call to ‘QBoxLayout::addWidget(QHBoxLayout*&, int, Qt::Alignment&)’
/usr/include/qt4/QtGui/qboxlayout.h:81: note: candidates are: void QBoxLayout::addWidget(QWidget*, int, Qt::Alignment)
make: *** [trackingthreshold.o] Error 1
I looked online for hints and can't find the right thing, the only thing I came accross that was close was a 1997 thread:
http://lists.trolltech.com/qt-interest/1997-04/thread00095-0.html
My QDockWidget code is :
QHBoxLayout *lwrDockLayout = new QHBoxLayout;
QHBoxLayout *lwrDockLayout0 = new QHBoxLayout;
QBoxLayout *ldLayout = new QBoxLayout(dock, QBoxLayout::TopToBottom);
//here I add buttons to lwrDockLayout and lwrDockLayout0
Qt::Alignment align=0; // This doesn't work I don't think I'm doing this right:
ldLayout->addWidget(lwrDockLayout, 0, align);
ldLayout->addWidget(lwrDockLayout0, 0, align);
QWidget *wi = new QWidget;
wi->setLayout(ldLayout);
dock->setWidget(wi);
addDockWidget(Qt::BottomDockWidgetArea, dock);
Any help, you can provide will be very helpful.
Thank you!
// Sal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081210/dca96796/attachment.html
More information about the Qt-interest-old
mailing list