[Solved]error: expected initializer before '}' token



  • Hello again,please.
    How do I find error codes or some way to reference specific errors.

    Thanks again
    @#include <QtGui>
    #include "obdii.h"

    obdiiDlg::obdiiDlg(QWidget *parent)
    :QDialog(parent)
    {
    lblMessage = new QLabel(tr("Message"));

    lblPIDData = new QLabel(tr("PID data"));
    treePIDData = new QTreeWidget;
    lblPIDData->setBuddy(treePIDData);
    
    connect(btnGetDTC, SIGNAL(clicked()), this, SLOT(btnGetDTCClicked()));
    
    QVBoxLayout *leftLayout = new QVBoxLayout;
    leftLayout->addWidget(lblPIDData);
    leftLayout->addWidget(treePIDData);
    
    QHBoxLayout *mainLayout = new QHBoxLayout;
    mainLayout->addLayout(leftLayout);
    
    setLayout(mainLayout);
    setWindowTitle("OBDII");
    setLayout(mainLayout);
    
    void tbnGetDTCClicked()
    

    // void btnGetPIDDataClicked()
    // void btnClearMILClicked()
    // void btnGoOnlineClicked()
    // void btnSendDataClicked()
    // void btnPrintClicked()
    }

    void btnGetDTCClicked()
    {
    for (int i =0; i < 1000; i++);
    }

    @


  • Lifetime Qt Champion

    Hi,

    Line 26 to 32 are suspicious. It looks like are declaring the function (so they should not be there) and the lines are missing semi-colon.



  • mWahahaha!


Log in to reply
 

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