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. Can't watch preview

Can't watch preview

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 2 Posters 2.3k 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.
  • R Offline
    R Offline
    rchicago
    wrote on last edited by
    #1

    Hi,

    I'm quite new to Qt and got a bit of a problem. Preview in design mode only shows the layout of objects like the link below. On this screen I put a png file 64x64 resized to 0x0 for some reason appeared as a dot on a checkered rectangle. This rectangle doesn't mean to be a checkered, either.

    http://gyazo.com/e77280afa6618f4623d785bdb454a127

    I'm using Windows Vista and tried both VS2010 and MinGW. Both show the same problem. Can anybody help me, please?

    Thanks,

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gennon
      wrote on last edited by
      #2

      You could try to set a value to the width and hight in the designview. You see the gray bar above the designview where you have some inputboxes for Width and Height.

      Set them to 300 x 300 for instance, or as big as you want your item to be. That at least works for me.

      /Gen

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rchicago
        wrote on last edited by
        #3

        Thanks Gennon, I tried your suggestion but only changed the size of checkered box.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Gennon
          wrote on last edited by
          #4

          Can you paste your qml code here?

          Have you set a width and height to your root item and a color to your background rectangle?

          /Gen

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rchicago
            wrote on last edited by
            #5

            So this is the qml code, just a default given by project launcher, only color is changed to check if preview works.
            Actually this issue is not consistent. Sometimes preview works as it should be, with the very same qml code. It makes the matter worse, I guess.

            import QtQuick 2.0

            Rectangle {
            width: 360
            height: 360
            color: "#343434"
            Text {
            text: qsTr("Hello World")
            anchors.centerIn: parent
            }
            MouseArea {
            anchors.fill: parent
            onClicked: {
            Qt.quit();
            }
            }
            }

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Gennon
              wrote on last edited by
              #6

              It could be a bug in QtCreator, which version are you running? I have 2.7.0 based on Qt. 5.0.2.

              /Gen

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rchicago
                wrote on last edited by
                #7

                2.7.0 based on Qt 5.0.2.
                Maybe I should report a bug. Meantime, I will try older or newer version of QtCreator.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  Gennon
                  wrote on last edited by
                  #8

                  Yea, but perhaps you should try a re-install (if you have not already). I had to uninstall and then delete the folder manually sometime to fix an installation.

                  Anyway the 2.7.0 based on Qt 5.0.2 works on my machine a Lenovo X230 running Win 7 64-bit.

                  /Gen

                  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