Thanxs.....
this is piece of my code ..... i am trying to create a toolabar with buttons (namedviewact is one of the buttons.)after that i will insert two comboboxes one right side of the button group and one below this set (buttton group and combobox..... in the same toolbar)....
snything that I am missing?
void HQApplication::CreateToolbars()
{
tools_toolbar
= new QToolBar( "view",
this);
optionwidget
= new QWidget(tools_toolbar
);
tools_toolbar->addAction(namedViewAct);
VisualStyleCombo
= new QComboBox(optionwidget
);
VisualStyleCombo
->setInsertPolicy
(QComboBox::InsertAfterCurrent);
VisualStyleCombo->addItem(*realisticIcon,tr("realistic"));
connect(VisualStyleCombo, SIGNAL(currentIndexChanged(int)),this, SLOT(VisualStyleChanged(int)));
qa->setVisible(true);
tools_toolbar->addWidget(optionwidget);///////// OR
//tools_toolbar->insertWidget(namedViewAct,optionwidget);// i tried both
this->addToolBar(tools_toolbar);
}
void HQApplication::CreateToolbars()
{
tools_toolbar = new QToolBar( "view", this);
optionwidget = new QWidget(tools_toolbar);
tools_toolbar->addAction(namedViewAct);
VisualStyleCombo = new QComboBox(optionwidget);
VisualStyleCombo->setInsertPolicy(QComboBox::InsertAfterCurrent);
VisualStyleCombo->addItem(*realisticIcon,tr("realistic"));
connect(VisualStyleCombo, SIGNAL(currentIndexChanged(int)),this, SLOT(VisualStyleChanged(int)));
QAction* qa = new QAction(VisualStyleCombo);
qa->setVisible(true);
tools_toolbar->addWidget(optionwidget);///////// OR
//tools_toolbar->insertWidget(namedViewAct,optionwidget);// i tried both
this->addToolBar(tools_toolbar);
}
To copy to clipboard, switch view to plain text mode
Thanxs once again.........
Bookmarks