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. Windows: C++ does not support default-int
Servers for Qt installer are currently down

Windows: C++ does not support default-int

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.2k Views 2 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.
  • S Offline
    S Offline
    sonichy
    wrote on 27 Aug 2018, 09:47 last edited by sonichy
    #1
    void MainWindow::keyPressEvent(QKeyEvent *event)
    {
        qDebug() << event;
        ui->statusBar->showMessage(event->text());
        if (event->key() == Qt::Key_Escape) {
            ui->pushButton_Esc->setChecked(true);
        }
        ....
    }
    

    Linux has no error.

    Windows error:
    moc_mainwindow.cpp

    QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = {
    { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
          qt_meta_data_MainWindow,  qt_static_metacall, nullptr, nullptr}
    };
    

    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    https://github.com/sonichy

    A K 2 Replies Last reply 27 Aug 2018, 09:57
    0
    • S sonichy
      27 Aug 2018, 09:47
      void MainWindow::keyPressEvent(QKeyEvent *event)
      {
          qDebug() << event;
          ui->statusBar->showMessage(event->text());
          if (event->key() == Qt::Key_Escape) {
              ui->pushButton_Esc->setChecked(true);
          }
          ....
      }
      

      Linux has no error.

      Windows error:
      moc_mainwindow.cpp

      QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = {
      { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
            qt_meta_data_MainWindow,  qt_static_metacall, nullptr, nullptr}
      };
      

      error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

      A Offline
      A Offline
      Asperamanca
      wrote on 27 Aug 2018, 09:57 last edited by
      #2

      @sonichy
      In which line is the error raised?
      Typically, some symbol has only been forward-declared, but the corresponding header file has not been included.

      1 Reply Last reply
      1
      • S sonichy
        27 Aug 2018, 09:47
        void MainWindow::keyPressEvent(QKeyEvent *event)
        {
            qDebug() << event;
            ui->statusBar->showMessage(event->text());
            if (event->key() == Qt::Key_Escape) {
                ui->pushButton_Esc->setChecked(true);
            }
            ....
        }
        

        Linux has no error.

        Windows error:
        moc_mainwindow.cpp

        QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = {
        { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
              qt_meta_data_MainWindow,  qt_static_metacall, nullptr, nullptr}
        };
        

        error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

        K Offline
        K Offline
        koahnig
        wrote on 27 Aug 2018, 09:58 last edited by
        #3

        @sonichy

        You should indicate for which line the error is output.

        I would assume that it is

            qDebug() << event;
        

        You are simply trying to output an address there. That is probably open to debate if you want to treat as error or not.
        If you are really interested in the address only, than cast it as an integer.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        2

        1/3

        27 Aug 2018, 09:47

        • Login

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