Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Strange refreshing when displaying a Qml dialog from a QWidget-based window
Forum Updated to NodeBB v4.3 + New Features

Strange refreshing when displaying a Qml dialog from a QWidget-based window

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 464 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.
  • A Offline
    A Offline
    Alik
    wrote on last edited by
    #1

    Hello,

    I've searched around for a couple of hours but can't find this one out -- sorry if I missed it.

    I have a QWidget-based .ui form. When the user clicks a button I display a separate window displaying a Qml file as a dialog. I use this code:

    @QQuickView *view = new QQuickView();
    view->setResizeMode(QQuickView::SizeRootObjectToView);
    view->setSource(QStringLiteral("MyDialog.qml"));
    view->setWidth(800);
    view->setHeight(500);
    view->show();@

    This works, but I get bizarre refreshing artifacts as in this image: !http://i.imgur.com/M3rzVmX.png(screenshot)! (Note the slider, which has weird vertical interlacing, and the text box, which has rendered on top of itself.)

    When I spawn this Qml as the root window set in a QtQuick2ApplicationViewer everything is fine. So I'm guessing I'm spawing this incorrectly. I looked around a lot for how to spawn it, but everything I found about Qml + QWidgets was about putting a QWidget into a Qml window, which is not what I'm going for.

    Specs: Qt 5.3, running on Ubuntu 14.04.

    Thanks very much for any help,

    Alec

    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