Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • QtQuick 2.0 scene on top of Direct3D scene

    1
    0 Votes
    1 Posts
    907 Views
    No one has replied
  • Best way to plot x and y

    2
    0 Votes
    2 Posts
    945 Views
    B
    I used Qwt for this: http://qwt.sourceforge.net/ There is also this one: http://www.qcustomplot.com/ , but I never tried it. Seems a bit more like what you want :) Actually, I found them via google "qt plot" , ... [btw: why QtQuick forum?]
  • QtQuick2 and OpenGL 4

    4
    0 Votes
    4 Posts
    1k Views
    N
    bq. QtQuick dont draw if text less 17 symbols. Bug Qt... In latest version everything perfectly works, but there was the last question. Why glClearColor dont work in initialise function? Just work in render function, or if i use QWindow its work.
  • Convert from custom type to string

    1
    0 Votes
    1 Posts
    733 Views
    No one has replied
  • QQuickWindow grabbing, animation issue

    9
    0 Votes
    9 Posts
    4k Views
    O
    There is no way you can access your QML file? I would really recommend to do that with timers and signals. On each timeremit it updates the window, that means the values by using transisions or animations and emits a signal to capture a screenshot. Then you can combine these images to a video. To sletta's recording method: It would work if you would record it with 60fps+ which means that there is a 100% chance that you capture each necessary frame for your 30fps rate. The monitor frequency should not be a problem because that is only the display ratio of your monitor which doesn't affect the true frames per second. So your graphics card and/or your cpu could render/record with more than your monitors frame rate of by default 60fps(60hz).
  • Test if "elide" is invoked on current item of ListView

    3
    0 Votes
    3 Posts
    971 Views
    D
    Yep, should have seen that one. Thanks!
  • AnimatedSprite: reverse property

    3
    0 Votes
    3 Posts
    1k Views
    B
    Yeah, sorry for forgetting this. http://jackbutnotjill.com/final_project/experiments/prototype/images/characters/m-5.png (I found this via "test sprite" @google images x) [EDIT: I use Qt 5.2-msvc2012-opengl, perhaps this information is needed too]
  • [SOLVED] Read/write user settings

    17
    0 Votes
    17 Posts
    11k Views
    T
    Is the wrapper suppose to work out of the box and how do i make it work without qscopedpointer? Thank you EDIT : Created a proper solution so anyone can answer to help future member
  • Filter QML Model

    4
    0 Votes
    4 Posts
    5k Views
    S
    Hi jens, I've tried to port my QAbstractListModel to a QSortFilterProxyModel. But it keeps crashing as soon as i try to set data or accessing the ClipList m_clips member in any way. Can the QSortFilterProxyModel provide more than one filtered model based on one set of data ? For example I need two lists based on the same model both with a different filter aktive. @ class CoreEngine; class ClipFilterModel : public QSortFilterProxyModel { Q_OBJECT public: ClipFilterModel(CoreEngine *parent = 0); enum Roles {ObjectRole = Qt::UserRole, Fklz}; QHash<int, QByteArray> roleNames() const { QHash<int, QByteArray> roles; roles[ObjectRole] = "object"; roles[Fklz] = "fklz"; return roles; } QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; void addClip(ClipElement *clip); int rowCount(const QModelIndex & parent = QModelIndex()) const; void clear(); inline ClipList *getModelClipList() {return &this->m_clips;} bool loadClipList(); private: ClipList m_clips; CoreEngine *core; }; @ .cpp @#include "clipfiltermodel.h" #include <QtWidgets> //! [0] ClipFilterModel::ClipFilterModel(CoreEngine *parent) : QSortFilterProxyModel(parent) { this->core = parent; } QVariant ClipFilterModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); if (index.row() >= m_clips.size() || index.row() < 0) return QVariant(); if (role == Fklz) return QVariant::fromValue(this->m_clips.at(index.row())->getFklz()); else return QVariant::fromValue(this->m_clips.at(index.row())); } void ClipFilterModel::addClip(ClipElement *clip) { beginInsertRows(QModelIndex(), rowCount(), rowCount()); m_clips.append(clip); endInsertRows(); } int ClipFilterModel::rowCount(const QModelIndex & /* parent */) const { return m_clips.count(); } void ClipFilterModel::clear() { beginResetModel(); this->m_clips.clear(); endResetModel(); } bool ClipFilterModel::loadClipList() { beginResetModel(); this->clear(); this->m_clips.append(this->core->getDBHandle()->getClipList()); endResetModel(); return true; } @
  • JSON.parse reports error, even despite proper parsing

    2
    0 Votes
    2 Posts
    1k Views
    Q
    Turns out this was because I was using an XMLHttpRequest for the parse data, and should have checked that the XMLHttpRequest was in a finished state before attempting to parse; eventually, it would parse correctly, but intermediate states would cause the parsing to occur on incomplete data.
  • TextInput and openSoftwareInputPanel on Windows

    4
    0 Votes
    4 Posts
    5k Views
    M
    And this is a version for the QtQuick2ApplicationViewer: @const QString character; QtQuick2ApplicationViewer *viewer; QKeyEvent event(QEvent::KeyPress, 0, Qt::NoModifier, character); if (viewer) viewer->sendEvent(viewer->activeFocusItem(), &event);@
  • Can't access model variable from delegate

    3
    0 Votes
    3 Posts
    1k Views
    H
    I have already tried with this result: 3x ReferenceError: Can't find variable: value ReferenceError: Can't find variable: name
  • Virtual keyboard when input text has focus

    4
    0 Votes
    4 Posts
    6k Views
    M
    There is now a Virtual Keyboard component for Qt Enterprise. But works only for X11 or Android for now, though Windows support is planned. http://blog.qt.digia.com/blog/2014/02/04/new-virtual-keyboard-for-qt-enterprise/
  • QML files not found when deploying on Mac

    3
    0 Votes
    3 Posts
    1k Views
    Q
    Hm, if I do not use a resource file and just use a simple setup like this: @ QtQuick2ControlsApplicationViewer viewer; viewer.setMainQmlFile(QStringLiteral("qml/ajssg-view/main.qml")); viewer.show();@ The qml is properly deployed. However as soon as I go to this, it does not work at all as smoothly (or for me yet, at all): @ QApplication app(argc, argv); QQmlApplicationEngine engine(QUrl::fromLocalFile("main.qml")); return app.exec();@ I've tried every conceivable path and expression for engine() constructor.
  • Window and Controls - prevent multiple child windows

    2
    0 Votes
    2 Posts
    904 Views
    J
    You could for instance declare connectWindow as a regular property of the main window and only set the visible property to true if it has already been created when you trigger connect.
  • [unsolved]QML is slow in Android

    7
    0 Votes
    7 Posts
    5k Views
    O
    I'm also always putting my qml files into a resource file so just give it a try, maybe it'll fix it.
  • Incomprehensible background qml ApplicationWindow

    2
    0 Votes
    2 Posts
    1k Views
    S
    can't locate problem but that code is fine @ ApplicationWindow{ id: mainWindow width:640 height: 480 visible: true title: "Srt translate helper" ProgressBar { id: progress height: 15 anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right anchors.bottomMargin: 2 } ColumnLayout { id: leftLayout width: parent.width/2 anchors.bottom: progress.top anchors.bottomMargin: 5 anchors.top: parent.top anchors.topMargin: 5 anchors.left: parent.left anchors.leftMargin: 5 Text { text: "Three" } Text { text: "words" } Text { text: "in" } Text { text: "a" } Text { text: "row" } } ColumnLayout { id: rigthLayout anchors.left: leftLayout.right anchors.leftMargin: 5 anchors.right: parent.right anchors.rightMargin: 5 anchors.bottom: progress.top anchors.bottomMargin: 5 anchors.top: parent.top anchors.topMargin: 5 Text { text: "Three" } Text { text: "words" } Text { text: "in" } Text { text: "a" } Text { text: "row" } } } @
  • Promoting widget to QGLWidget

    1
    0 Votes
    1 Posts
    705 Views
    No one has replied
  • FileDialog as superuser strange behaviour

    3
    0 Votes
    3 Posts
    1k Views
    M
    Your code help me! thankyou
  • How I can add *.qml files to my plugin?

    14
    0 Votes
    14 Posts
    6k Views
    shavS
    Hi, Small update about my problem. I've found a bug. But now, I can't understand how this fix. In my QML file from plugin I've remove line: @ import com.shav.msl 1.0 @ This helped to me compile the app and load it. But now I have a question: How I can use classes from my C++ plugin in this QML file? If I remove this line my QML file can't use C++ classes from plugin. Thanks for the help.