Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QWidget * MainWindow::createBackgroundCellWidget ( const QString text,
const QString image 
) [private]

[27]

[28]

Definition at line 553 of file mainwindow.cpp.

References QButtonGroup::addButton(), QGridLayout::addWidget(), QWidget::QWidget(), and QWidget::setLayout().

Referenced by createToolBox().

{
    QToolButton *button = new QToolButton;
    button->setText(text);
    button->setIcon(QIcon(image));
    button->setIconSize(QSize(50, 50));
    button->setCheckable(true);
    backgroundButtonGroup->addButton(button);

    QGridLayout *layout = new QGridLayout;
    layout->addWidget(button, 0, 0, Qt::AlignHCenter);
    layout->addWidget(new QLabel(text), 1, 0, Qt::AlignCenter);

    QWidget *widget = new QWidget;
    widget->setLayout(layout);

    return widget;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index