Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Need help of code to create a protoptype



  • 0_1544461380167_Temp444.png

    #include "mainwindow.h"
    #include <QHeaderView>

    myWidget::myWidget(QWidget* parent): QWidget(parent) {

    QLabel* label = new QLabel("Options");
    QPushButton * button22 = new QPushButton;
    button22->setText("+");
    QHBoxLayout* hbox1 = new QHBoxLayout ;
    
    button22->setText("+");
    
    hbox1->addWidget(label);
    hbox1->addWidget(button22);
    setLayout(hbox1);
    

    }

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
    {

    QTableWidget * t = new QTableWidget;
    t->setColumnCount(5);
    t->setRowCount(3);
    QStringList headerLabels;

    QString col1 = "No of Mappings";
    QString col2 = "Set";

    QString col3 = "Type";

    QString col4 = " Mapping rules : spec_string : spec_string2 ";

    QString col5 = "Options";

    headerLabels << col1 << col2 << col3 << col4 << col5;
    t->setHorizontalHeaderLabels(headerLabels);
    QTableWidgetItem* item = new QTableWidgetItem;
    item->setText("Cell");
    t->setColumnWidth(3,50);

    myWidget* myWid = new myWidget;
    //t->setCellWidget(1,1,myWid);

    t->verticalHeader()->hide();

    t->show();

    }

    MainWindow::~MainWindow()
    {

    }

    Need help in creating the Table . Please help me in coding


  • Qt Champions 2019

    @Qt-Enthusiast said in Need help of code to create a protoptype:

    Please help me in coding

    Please ask specific questions. This is a forum and not outsourcing company...
    What does not work?
    I don't see you doing anything with item.


  • Qt Champions 2017

    @Qt-Enthusiast I think you asked this question many times. People in the group have already given you so much of information. You need to read the documents & links given to you. Once you do some prototype, ask very specific question to group. They will help. No body will help in coding for you.



  • Thanks I will take care


Log in to reply