Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8958087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:08:20+00:00 2026-06-15T15:08:20+00:00

Let’s say that we have a very simple QML file, like this one: import

  • 0

Let’s say that we have a very simple QML file, like this one:

import QtQuick 2.0

Rectangle {
    width: 800
    height: 600
    color: '#000'

    Text {
        text: qsTr("Hi all")
        anchors.centerIn: parent
    }
}

The QML File is loaded with the QtQuick2ApplicationViewer helper class, like this:

QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/MyApp/Login/Window.qml"));
viewer.showFullScreen();

How should I proceed, if for example I would like to change the Rectangle’s color to white, from C++. My guess was:

QQuickItem *window = viewer.rootObject();
window->setProperty("color", "#fff");

But all that does is the following compiler error:

invalid use of incomplete type 'struct QQuickItem'
forward declaration of 'struct QQuickItem'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:08:21+00:00Added an answer on June 15, 2026 at 3:08 pm

    Then QQuickItem was forward declared somewhere in a header you included, but not fully qualified. Here more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a very simple PrototypeJS class that looks like this: var
Let's say that I have something like this in my web.xml file. <filter name=foo>
Here is one very simple question(or at least at first sight).Let's say we have
Let's say that I have this string: s = '<p>Hello!</p>' When I pass this
Let's say that I have the following code that's run in one thread of
Let's say that I have a string 5a . This is the hex representation
Let's say we have very simple Java class MyClass . public class MyClass {
let's say I have a class that does some calculations. This set of calculations
Beginner rails/javascript question: Let's say that I have a simple Circle model in a
Let's say that I have a SQLite database that I create in a separate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.