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. Black QQuickWidgets content when hide() and show() (Solved)
Forum Updated to NodeBB v4.3 + New Features

Black QQuickWidgets content when hide() and show() (Solved)

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 2 Posters 2.6k 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.
  • T Offline
    T Offline
    Tân Ngọc Đỗ
    wrote on last edited by
    #1

    Hello Every one,

    I'm using QQuickWidget to embedded my Qml Component into it.

    @
    m_container = new QQuickWidget();
    m_container->setSource(QUrl( "qrc:/MyComponent.qml" ));
    m_container->setResizeMode( QQuickWidget::SizeRootObjectToView );
    m_container->setMinimumHeight( 40 );
    m_container->hide();
    ...........................................................
    m_container->show();
    @

    when @m_container->show();@
    m_container is black , I can't see my qml component and receive a message :
    "QQuickWidget: render scenegraph with no context"

    I used to use QWidget to embedded QmlComponent with show() and hide(), everything is OK .
    But now I encounter this error .

    Could you please help me ?

    Thank you!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Looks like a bug to me. Which version of Qt are you using? If this is present in 5.4 RC, I think the release team should be notified.

      (Z(:^

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tân Ngọc Đỗ
        wrote on last edited by
        #3

        Hi sierdzio

        currently, I'm using 5.3.2. Is it possible for me to download 5.4 now ?

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Of course. The snapshots for RC release are available here: "link":http://download.qt-project.org/snapshots/qt/5.4/5.4.0-rc/.

          (Z(:^

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tân Ngọc Đỗ
            wrote on last edited by
            #5

            ok guy,

            I will test in new version and let you know the result!

            Thank you!

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Tân Ngọc Đỗ
              wrote on last edited by
              #6

              Hi sierdzio,

              It works ! Though there are still some problems.
              For example : In the qml components ( embedded in QQuickWidget)
              I have a button, when I hover on that button and move the mouse outsite the QQuickWidget "button.hovered" is still true . It's not correct ! Hope it will be fixed in the stable version.

              Anyways, thanks for your support!

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                OK, that is good news.

                Qt 5.4 is in final stages of development, so if this bug is not reported already, there is little change it will get fixed. But you can check on Qt bugtracker. This is definitely a bug and should be fixed.

                (Z(:^

                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