Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Can't find QDeclarativeView in QtCreator: Design mode

Can't find QDeclarativeView in QtCreator: Design mode

Scheduled Pinned Locked Moved Qt Creator and other tools
12 Posts 4 Posters 6.8k Views
  • 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.
  • B Offline
    B Offline
    Bubbas
    wrote on last edited by
    #1

    Hi all,

    I can't seen to find the QDeclarativeView among the available widgets in QtCreator when I'm in "design mode". Do I have to load some special plugin? and if so, where can i find it?

    Best Regards,
    Bubbas

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      AFAIK, there isn't such a widget yet. You can use widget promotion though.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        ZapB
        wrote on last edited by
        #3

        Yeah, you should be able to promote a QGraphicsView I think.

        Nokia Certified Qt Specialist
        Interested in hearing about Qt related work

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          [quote author="ZapB" date="1300191829"]Yeah, you should be able to promote a QGraphicsView I think.[/quote]
          It doesn't really matter what widget you choose to promote. Any widget from the hierarchy should work:
          QGraphicsView, QAbstractScrollArea, QFrame, or QWidget. The only thing is, that the closer the widget is to the widget you will be using there, the more the preview looks like the end result (and I think the more properties you can set using designer and expect them to work, but I am not even sure about that aspect).

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZapB
            wrote on last edited by
            #5

            Yes that is correct. I try to use the closest available class from the inheritance hierarchy. More chance of things like size hints working in the preview too. ;-)

            Nokia Certified Qt Specialist
            Interested in hearing about Qt related work

            1 Reply Last reply
            0
            • B Offline
              B Offline
              Bubbas
              wrote on last edited by
              #6

              Aha, thanks for the info!
              Bubbas

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZapB
                wrote on last edited by
                #7

                I can see QDeclarativeView in the design mode using qt-creator 2.1.0. It is in the same group as QGraphicsView. Make sure that you are using the latest version.

                Nokia Certified Qt Specialist
                Interested in hearing about Qt related work

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Bubbas
                  wrote on last edited by
                  #8

                  Hmmm...that's strange. I'm running QtCreator 2.1.0 and the only widgets available for me in the "DisplayWidgets" group are:

                  "Label"
                  "Text Browser"
                  "Graphics View"
                  "Calendar"
                  "LCD Number"
                  "Progress Bar"
                  "Horizontal Line"
                  "Vertical Line"
                  "QWebView"

                  Have you installed any "add-on" packages for QtCreator? I downloaded the Qt SDK 1.1 Beta and nothing else.

                  /Bubbas

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #9

                    Bubbas, then something is very wrong with your Creator setup. By default, Creator has many more widgets. The above is not even enough for a very basic label + line edit + button form!

                    You should probably take care of that first. And those widgets don't come out of "add-on" packages for Creator either, they should be there by default.

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Bubbas
                      wrote on last edited by
                      #10

                      Hi,

                      There are a lot more widgets present in the Creator I have installed. However, under the tab "DisplayWidgets" there are only the ones I mentioned in my previous post. There are a lot of other tabs where a lot of other widgets are present (e.g. "Input Widgets", "Containers", "Buttons" etc. etc).

                      The only widget missing is the "QDeclarativeView".

                      /Bubbas

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        luca
                        wrote on last edited by
                        #11

                        Hi,
                        my QtCreator too hasn't QDeclarativeView. Are you sure to see QDeclarativeView "object" ?
                        What OS are you using? I'm using Linux QtSDK 1.1.3 .

                        To use QDeclarativeView in QtCreator I promoted a QGraphicsView but there is a problem.

                        I have a very simple QML file:
                        @
                        import QtQuick 1.0
                        import Qt 4.7
                        Rectangle {
                        // color: "lightblue"
                        width: 400; height: 400
                        Component {
                        id: riepilogo_delegate
                        Rectangle {
                        id: item
                        width: list.width; height: 100
                        Column {
                        anchors.fill: parent
                        Text { text: descrizione_estesa; anchors.horizontalCenter: parent.horizontalCenter }
                        Text {
                        id: valore_dato; text: valore; anchors.horizontalCenter: parent.horizontalCenter
                        }
                        }

                            }
                        }
                        ListView {
                            id: list
                            boundsBehavior: Flickable.DragAndOvershootBounds
                            anchors.fill: parent
                            model: riepilogoSatelliteModel
                            delegate: riepilogo_delegate
                            flickableDirection: Flickable.AutoFlickDirection
                        }
                        

                        }
                        @

                        It works but using a QDeclarativeView promoted from QtCreator seems to disable the "Flickable" ability while if I create the QDeclarativeView with:
                        @
                        ...
                        dw = new QDeclarativeView(this);
                        dw->setSource(QString("qrc:myqml.qml"));
                        setCentralWidget(dw);
                        ...
                        @
                        the flicking is enabled...

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          luca
                          wrote on last edited by
                          #12

                          I also checked that flicking isn't enable with:
                          @
                          ...
                          dw = new QDeclarativeView(QString("qrc:myqml.qml"), this);
                          QGridLayout *gl = new QGridLayout(ui->declarativeBaseWidget);
                          gl->addWidget(dw);
                          ...
                          @
                          where ui->declarativeBaseWidget is a QWidget added from QtCreator...

                          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