Results 1 to 5 of 5

Thread: How to interface Qt Quick UI code with Qt creator pluing?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2014
    Location
    china
    Posts
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: How to inject Qt Quick QML into Qt Widget based desktop app;

    you can use a QML file as source,like the picture source

  2. #2
    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: How to inject Qt Quick QML into Qt Widget based desktop app;

    If you want to add your QtQuick view into a widget layout, you need to wrap it into a QWidget first and then add this

    Qt Code:
    1. // view constructed somewhere
    2. QQuickView *view ....
    3.  
    4. // create wrapper widget
    5. QWidget* viewContainer = QWidget::createWindowContainer(view);
    6.  
    7. // add widget as any other widget
    8. layout->addWidget(viewContainer)
    To copy to clipboard, switch view to plain text mode 

    With Qt 5.3 there will also be another alternative: QQuickWidget

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 22nd February 2012, 00:33
  2. Replies: 3
    Last Post: 1st February 2012, 00:18
  3. Qt Creator qt creator code model
    By Vanir in forum Qt Tools
    Replies: 0
    Last Post: 5th October 2010, 11:10
  4. Creator Interface Question
    By manilla_wise in forum Newbie
    Replies: 1
    Last Post: 9th August 2010, 23:53
  5. How to turn off translator code in creator
    By sanfordpaul in forum Newbie
    Replies: 0
    Last Post: 4th March 2009, 23:39

Tags for this Thread

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.