Nominate our 2022 Qt Champions!

Can't find QDeclarativeView in QtCreator: Design mode

  • 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,

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

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

  • [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).

  • 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. ;-)

  • Aha, thanks for the info!

  • 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.

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

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

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


  • 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.

  • 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".


  • 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);
    the flicking is enabled...

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

Log in to reply