Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]qstring.h:919: undefined reference to `QArrayData::deallocate
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 6.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    unixmania
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • U Offline
      U Offline
      unixmania
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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 ? :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved