[SOLVED]qstring.h:919: undefined reference to `QArrayData::deallocate



  • i cant find any solution above error.i have just main.cpp:
    @#include "tic.h"
    int main(int argc,char* argv[]){
    QApplication app(argc, argv);
    Ui::Form ui;
    QWidget* form=new QWidget();
    ui.setupUi(form);
    form->setVisible(true);
    return app.exec();
    }
    @
    and tic.h:
    @#ifndef TIC_H
    #define TIC_H
    #include <QtWidgets/QtWidgets>
    QT_BEGIN_NAMESPACE

    class Ui_Form
    {
    public:
    QLabel *lab1;
    QLabel *lab2;
    QSpinBox *heigh;
    QSpinBox *widt;
    QPushButton *buton;

    void setupUi(QWidget *Form&#41;
    {
        if (Form->objectName(&#41;.isEmpty())
            Form->setObjectName(QStringLiteral("Form"));
        Form->resize(400, 300);
        lab1 = new QLabel(Form);
        lab1->setObjectName(QStringLiteral("lab1"));
        lab1->setGeometry(QRect(20, 10, 81, 24));
        lab2 = new QLabel(Form);
        lab2->setObjectName(QStringLiteral("lab2"));
        lab2->setGeometry(QRect(170, 10, 81, 24));
        heigh = new QSpinBox(Form);
        heigh->setObjectName(QStringLiteral("heigh"));
        heigh->setGeometry(QRect(40, 60, 60, 33));
        heigh->setMinimum(3);
        heigh->setMaximum(10);
        widt = new QSpinBox(Form);
        widt->setObjectName(QStringLiteral("widt"));
        widt->setGeometry(QRect(180, 60, 60, 33));
        widt->setMinimum(3);
        widt->setMaximum(10);
        buton = new QPushButton(Form);
        buton->setObjectName(QStringLiteral("buton"));
        buton->setGeometry(QRect(110, 130, 125, 33));
    

    Form->setWindowTitle("TicTacToe");
    lab1->setText("height");
    lab2->setText("width");
    buton->setText("start");
    } // setupUi
    };

    namespace Ui {
    class Form: public Ui_Form {};
    } // namespace Ui

    QT_END_NAMESPACE

    #endif // TIC_H@

    main.cpp compiled successfully.But main.o when linking to executable get above error repetitive. my ENV:qt 5.1.0 archlinux on x86_64 corei5 desktop.No cross compile.Help me please.



  • never mind.i just forget QT += widgets
    this is mandotory needed for gui on qt5


  • Lifetime Qt Champion

    Great you found out !

    Could you also update your thread's title prepending solved so other forum users may know a solution as been found ? :)


Log in to reply
 

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