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 6370303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:54:47+00:00 2026-05-25T00:54:47+00:00

I have created qml/test.qml file as: import QtQuick 1.0 Rectangle { id: pahe width:

  • 0

I have created qml/test.qml file as:

import QtQuick 1.0
Rectangle
{
    id: pahe
    width: 200; height: 50
    color: "#55aaee"
    TextInput
    {
        id: editor
        anchors
        {
            left: parent.left; right: parent.right; leftMargin: 10; rightMargin: 10
            verticalCenter: parent.verticalCenter
        }
        cursorVisible: true; 
        font.bold: true
        color: "#151515"; 
        selectionColor: "Green"
        focus: true
    }
}

and One qml/main.cpp file as:

#include <QApplication>
#include <QtDeclarative>
#include <QDeclarativeView>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QDeclarativeView view;
    view.setSource(QUrl::fromLocalFile("test.qml"));

    view.setResizeMode(QDeclarativeView::SizeRootObjectToView);

    view.show();
    return app.exec();
}

I am compiling this main.cpp file using commands like:

#qmake -project
#qmake
#make

and I am running the exe as:

./qml

So problem is that I am not able to see any text on TextInput even after entering text using key board. If i print the TextInput.text of element it shows entered text on console log but can not see on screen.
What could be the reason?

If i run same test.qml file using qmlviewer it works fine.
Any hint or comment in this would be helpful.

Thanks,
KBalar

  • 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-05-25T00:54:48+00:00Added an answer on May 25, 2026 at 12:54 am

    The problem was with virtual Linux machine running on Windows PC. So If i run same example on Real Linux machine The problem wont be there.

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

Sidebar

Related Questions

I have created a C# class file by using a XSD-file as an input.
I have created an array thusly: import numpy as np data = np.zeros( (512,512,3),
I have created an XML file in my solution path. My solution has multiple
How can i resize automatically QML widget? I have QWidget created by hand. In
I have created a smalldatetime field. I am using a dbml file to access
I have created a Windows service that will run an exe file periodically to
I have created a little program that reads in a Java file and feeds
I have created a Resource File as App.rrc(Root)and App_fr.rrc under App.rrh(header file) and have
Have created a c++ implementation of the Hough transform for detecting lines in images.
I have created a template for Visual Studio 2008 and it currently shows up

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.