Can't find QDeclarativeView in QtCreator: Design mode
-
[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). -
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
-
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".
/Bubbas
-
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... -
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...