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. Invalid use of qualified-name
Forum Updated to NodeBB v4.3 + New Features

Invalid use of qualified-name

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 6.1k 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.
  • M Offline
    M Offline
    Miikukka
    wrote on last edited by
    #1

    When I run my file Qt Creator says: @invalid use of qualified-name 'QUiLoader::createLayout'@

    There is my cpp file.
    @#include "harjoittelu.h"
    #include "ui_harjoittelu.h"

    Harjoittelu::Harjoittelu(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::Harjoittelu)
    {
    ui->setupUi(this);
    }

    Harjoittelu::~Harjoittelu()
    {
    delete ui;
    }

    void Harjoittelu::on_pushButton_2_clicked()
    {
    QLayout QUiLoader::createLayout(const QString &harjoittelu, QObject Harjoittelu = 0, const QString &Edit = QString());
    }
    @

    And there is header:
    @#ifndef HARJOITTELU_H
    #define HARJOITTELU_H

    #include <QMainWindow>
    #include <QtUiTools/QUiLoader>

    namespace Ui {
    class Harjoittelu;
    }

    class Harjoittelu : public QMainWindow
    {
    Q_OBJECT

    public:
    explicit Harjoittelu(QWidget *parent = 0);
    ~Harjoittelu();

    private:
    Ui::Harjoittelu *ui;
    #include <QtUiTools/QUiLoader>

    private slots:
    void on_pushButton_2_clicked();
    };

    #endif // HARJOITTELU_H@

    Do you know what is the problem???
    Thanx!!!!

    There are no stupid questions, only stupid answers.

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      why is
      @#include <QtUiTools/QUiLoader> @
      in the middle of your class and not on top of your page...?

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Miikukka
        wrote on last edited by
        #3

        Ups. I just tested where I must put that, and forgot it. I took it out, but nothing happened.

        There are no stupid questions, only stupid answers.

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          your use 'QUiLoader::createLayout'
          in line 18 of your cpp file. Qt Creator is telling to look there.

          There you are using a declaration of a virtual function in the body of a function!!!

          What is it you want to do exactly?

          Qt Certified Specialist
          www.edalsolutions.be

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Miikukka
            wrote on last edited by
            #5

            Ööö.. [quote author="Eddy" date="1307111920"]There you are using a declaration of a virtual function in the body of a function!!!
            What is it you want to do exactly?
            [/quote]I didn't get this really.
            I want open new layout when I click pushButton_2.

            Is there something simpler solution to do this?
            I looked instructions here: http://doc.qt.nokia.com/latest/quiloader.html#createLayout

            Is it layout even it what shows on top of phone's screen and I can edit it in Qt Designer (set push buttons, list widgets, spin box etc.)?

            There are no stupid questions, only stupid answers.

            1 Reply Last reply
            0
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #6

              i suggest you read the docs.
              just follow your link and go to the detailed description.

              There is an example that shows the proper way to use a layout.

              Qt Certified Specialist
              www.edalsolutions.be

              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