Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • [Solved] QML Video Element

    9
    0 Votes
    9 Posts
    7k Views
    S
    Sorry for flooding this thread with my posts. Right now i am able to play only WAV audio files. For everything else i am getting the following error. @DirectShowPlayerService::doRender: Unresolved error code 80040218@ In my system Windows Media Player is installed and It plays Mp3 files fine.
  • How to use QDeclarativeExtensionPlugin Items

    7
    0 Votes
    7 Posts
    4k Views
    S
    the following code works normally but I couldn't assign the model to the view using setproperty method @#include <QtDeclarative/QDeclarativeExtensionPlugin> #include <QtDeclarative/qdeclarative.h> #include <QtGui/QGraphicsProxyWidget> #include <QTableview> #include <QSqlqueryModel> #include <QDebug> class MyView : public QGraphicsProxyWidget { Q_OBJECT Q_PROPERTY(QSqlQueryModel *model READ model WRITE setModel) public: MyView(QGraphicsItem* parent = 0) : QGraphicsProxyWidget(parent),view(new QTableView()),m_model(new QSqlQueryModel()) { setWidget(view); } void setModel(QSqlQueryModel *inModel) { m_model = inModel; } QSqlQueryModel *model() { return m_model; } private: QTableView *view; QSqlQueryModel *m_model; }; class QWidgetsPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT public: void registerTypes(const char *uri) { qmlRegisterType<MyView>(uri, 1, 0, "MyView"); } }; #include "qWidgets.moc" Q_EXPORT_PLUGIN2(qmlqwidgetsplugin, QWidgetsPlugin);@ this is the qml file @import QtQuick 1.0 import "QWidgets" 1.0 Rectangle { id: window property int margin: 30 width: 640; height: 480 color: palette.window MyView{ } } @
  • Using a QML model from a QDeclarativeItem subclass

    5
    0 Votes
    5 Posts
    4k Views
    S
    I have did the same as in this example, I replaced the qlist with standard model but in vain @#include <QAbstractListModel> #include <QStringList> //![0] class Animal { public: Animal(const QString &type, const QString &size); //![0] QString type() const; QString size() const; private: QString m_type; QString m_size; //![1] }; class AnimalModel : public QAbstractListModel { Q_OBJECT public: enum AnimalRoles { TypeRole = Qt::UserRole + 1, SizeRole }; AnimalModel(QObject *parent = 0); //![1] void addAnimal(const Animal &animal); int rowCount(const QModelIndex & parent = QModelIndex()) const; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; private: QList<Animal> m_animals; //![2] };@
  • How to Assing an id property for dynamically created element.

    20
    0 Votes
    20 Posts
    18k Views
    S
    assistant say: *QAbstractItemModel presents a hierarchy of tables, but the views currently provided by QML can only display list data. *
  • QDeclarativeView Error while deploying in Device

    9
    0 Votes
    9 Posts
    4k Views
    M
    Yes imrrk, I did on WindowsCE and my application executed with no error. Before copying i was getting "invalid windows ce executable" error.
  • How to integrate c++ and qt quick(qml)

    18
    0 Votes
    18 Posts
    13k Views
    K
    [quote author="imrrk" date="1293685687"]Hi everyone I tried with all the possibilities listed here...the example works fine in simulator but when i try to deploy it on device using Nokia Qt SDK i m getting error as follows 1.DeclarativeView no such file or directory [/quote] The latest Nokia Qt SDK available has support for Qt 4.6 only for release builds. So you cannot build QML app release with this SDK.
  • Questions about Compile Erros

    9
    0 Votes
    9 Posts
    4k Views
    X
    When I say older, I'm referring to the version of QtCreator. In the latest QtCreator's 'Auto' was changed to 'ScreenOrientationAuto' in the wrapper code, for example. The latest is QtCreator 2.1 RC.
  • Need help with button

    2
    0 Votes
    2 Posts
    2k Views
    K
    Many ways of doing this ... just onClicked() in previousbutton call anim_left.start() ... Take care of other conditons as well ;)
  • Trouble in Deploying QT quick application on Symbian device(N97 mini)

    5
    0 Votes
    5 Posts
    4k Views
    X
    Well the errors you gave occur before the device is even used so this has nothing to do with symbian/n97 mini. Your errors: This isn't an error. This is an error: Try including QObject in the header as it asks? Fix 2.
  • ListView's Highlight Rectangle Height

    4
    0 Votes
    4 Posts
    3k Views
    K
    list item=delegate
  • The font in QML is not smooth, in windows

    21
    0 Votes
    21 Posts
    16k Views
    C
    I think we misunderstand each other, or you wrote wrong, QML is part of Qt Quick... But yes, trolls fix it, if it doesn't belong to that category, we will see ;)
  • Dynamically parent objects to a property list that is not the default

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QtMultimediaKit Video element

    8
    0 Votes
    8 Posts
    5k Views
    K
    [quote author="CreMindES" date="1293627470"]The expected support for Symbian will cover both Symbian^3 and Symbian 5th?[/quote] Yes
  • Hide Cursor in QML

    9
    0 Votes
    9 Posts
    10k Views
    K
    I appreciate the help.
  • QML viewer on N900

    2
    0 Votes
    2 Posts
    2k Views
    M
    What about @ apt-cache search qt4 | grep declarative @
  • Nokia Qt SDK with QML Installation problem

    7
    0 Votes
    7 Posts
    4k Views
    M
    According to some sources it will be released on Q1 2011.
  • Execute javascript function in 'State'

    4
    0 Votes
    4 Posts
    6k Views
    K
    "Please look here":http://doc.qt.nokia.com/4.7/qml-statechangescript.html
  • GradientAnimation (like ColorAnimation)

    2
    0 Votes
    2 Posts
    3k Views
    K
    Use color animation for each gradient stop
  • Animating button press

    6
    0 Votes
    6 Posts
    14k Views
    J
    The problem with your examples is that the button is only animated when it is held. Unfortunately this doesn't work on Windows 7 tablet PC at all, because long press is treated like a right mouse click and not registered. The only working solution I found is this: file Button.qml @import Qt 4.7 Item { id: container signal clicked property string text Rectangle { id: buttonRectangle width: container.width height: container.height color: "red" MouseArea { id: mouseArea; anchors.fill: parent onClicked: { buttonRectangle.state = "pressed" stateTimer.start() container.clicked() } } Text { color: "#fff" anchors.centerIn: buttonRectangle font.pixelSize: 12 text: container.text } states: State { name: "pressed" PropertyChanges { target: buttonRectangle; scale: 0.7 } } Timer { id: stateTimer interval: 200; repeat: false onTriggered: buttonRectangle.state = 'State0' } transitions: Transition { NumberAnimation { properties: "scale"; duration: 200; easing.type: Easing.InOutQuad } } } }@ But I do believe there should be an easier way to implement this behavior of the button.
  • Reading local Symbian file using XMLHttpRequest

    7
    0 Votes
    7 Posts
    3k Views
    S
    As per my messages... "I assumed this would map to the private dir because the Qt created pkg file puts them there."...."When I run the app, the XMLHttpRequest can’t see the file" Simon