[Resolved] How to add three buttons into a cell of an QTabWidget?

  • Hi
    I have a QtabWidget and I want to add three buttons into its last cells. How can I deal with??

  • Lifetime Qt Champion


    Do you mean QTableWidget ? If so have a look at setCellWidget

  • Yes I mean an QTableWidget. Thank you SGaist. I'm able now to add buttons into a celleWidget. Here's my code:
    @QWidget * buttonGroup = new QWidget;
    QPushButton mVisualize = new QPushButton();
    mVisualize->setMinimumSize(25, 25);

    QPushButton mEdite = new QPushButton();
    mEdite->setMinimumSize(25, 25);

    QPushButton mDelete = new QPushButton();
    mDelete->setMinimumSize(25, 25);

    QHBoxLayout * horizontalLayhout = new QHBoxLayout;


    ui->myTableWidget->setCellWidget(1, 3,buttonGroup); @

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.