Results 1 to 10 of 10

Thread: Problems with QtQuick wizard generated project

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    Quote Originally Posted by enrico5th View Post
    I didn't understand your question.
    you wrote "when I start debugging" and I was asking what exactly you were doing.
    Did you run the application or just "run" the QML file.

    Quote Originally Posted by enrico5th View Post
    What I don't understand is why the import statement inside main.qml file is not recognized.
    It should, hence my question to narrow down possible errors.

    Quote Originally Posted by enrico5th View Post
    Could you please try to create a QtQuick project like this, add my files and see if everything works on your side? Maybe an experienced Qt programmer like you could understand the problem better than I can do.
    I can do that if you attach a buildable example.

    Cheers,
    _

  2. #2
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    I run the whole application.
    You can find the whole project attached to this post.
    Attached Files Attached Files

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    After I got it to build, it worked for me.

    provaintegrazione.zip

    Cheers,
    _

  4. #4
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    Does it work without any modification? When I build and run it, a little white window appears on the screen (instead of a big red rectangle), then I look at the Application Output window and the message "module "APP_CHILD" is not installed import APP_CHILD 1.0" has been output there. I tried on two different platform and I got the same problem. I'm now asking to myself what's the difference between my platform and yours.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    Lets try with a very simple example

    main.cpp
    Qt Code:
    1. #include <QtQml>
    2.  
    3. int main(int argc, char **argv)
    4. {
    5. QCoreApplication app(argc, argv);
    6.  
    7. qmlRegisterType<QTimer>("APP_CHILD", 1, 0, "AppChild");
    8.  
    9. QQmlEngine engine;
    10.  
    11. QQmlComponent component(&engine);
    12. component.setData("import APP_CHILD 1.0\n\nAppChild { }", QUrl());
    13. qDebug() << "created object=" << component.create();
    14.  
    15. return 0;
    16. }
    To copy to clipboard, switch view to plain text mode 

    appchildtest.pro
    Qt Code:
    1. TEMPLATE = app
    2. TARGET = appchildtest
    3. INCLUDEPATH += .
    4.  
    5. # Input
    6. SOURCES += main.cpp
    7.  
    8. QT += qml
    To copy to clipboard, switch view to plain text mode 

    Executing that should give you an output like this:

    created object= QTimer(0xc2b250)

    Once you've veryfied that, add you class and register it instead of QTimer.

    Cheers,
    _

  6. #6
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    Your example works perfectly, this makes me think there's some problem in the way I've attached the main.qml file in my project. But that was done automatically by the Qt Quick wizard for projects creation. This thing is making me crazy!!!

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems with QtQuick wizard generated project

    Have you tried running the program from a terminal/shell?

    Just to make sure you are actually running the program, not just "running" the QML file.

    Cheers,
    _

Similar Threads

  1. How to create a QtQuick 1 Application project?
    By TheIndependentAquarius in forum Qt Tools
    Replies: 1
    Last Post: 23rd October 2013, 11:02
  2. MSVC Project generated using qmake - turn off flat structure
    By Piskvorkar in forum Qt Programming
    Replies: 3
    Last Post: 4th February 2013, 23:25
  3. Replies: 1
    Last Post: 29th September 2011, 11:14
  4. visualize qtQuick project
    By amadanes in forum Newbie
    Replies: 1
    Last Post: 8th May 2011, 23:15
  5. Qt Creator Crossplatform project wizard
    By lunarcloud in forum Qt Tools
    Replies: 0
    Last Post: 11th April 2011, 07:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.