Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • 0 Votes
    1 Posts
    558 Views
    No one has replied
  • [solved] How to make Text font size to be auto adjusted

    3
    0 Votes
    3 Posts
    15k Views
    M
    Thanks, I've tested that and have notice that it also works with anchors.
  • Transition Camera state without blocking GUI

    1
    0 Votes
    1 Posts
    438 Views
    No one has replied
  • [SOLVED] Find all mouse areas and assign click event

    1
    0 Votes
    1 Posts
    588 Views
    No one has replied
  • [SOLVED] Weird transparency with framebuffer

    1
    0 Votes
    1 Posts
    711 Views
    No one has replied
  • QML + TreeView + Sorting/Filtering Challenges

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Pure QML module

    1
    0 Votes
    1 Posts
    558 Views
    No one has replied
  • Artifacts with Image rendering

    1
    0 Votes
    1 Posts
    479 Views
    No one has replied
  • Using a custom font in canvas for a standalone qml application

    1
    0 Votes
    1 Posts
    524 Views
    No one has replied
  • [SOLVED] ToolButton clicked() signal is not emitted on Windows 8

    3
    0 Votes
    3 Posts
    1k Views
    D
    The issue was fixed by capturing clicks in MouseArea and passing them to parent element. @// MyToolButton.qml ToolButton { property real iconWidth: 32 property real iconHeight: 32 property real iconMargins: 2 property url iconSrc: "" implicitWidth: iconWidth + 2 * iconMargins implicitHeight: iconHeight + 2 * iconMargins Image { anchors.fill: parent anchors.margins: iconMargins fillMode: Image.Pad source: iconSrc sourceSize.width: iconWidth sourceSize.height: iconHeight } id: _btn MouseArea { anchors.fill: parent onClicked: _btn.clicked() } }@
  • C++ context properties and custom components.. how??

    1
    0 Votes
    1 Posts
    969 Views
    No one has replied
  • Qml slider stepsize

    1
    0 Votes
    1 Posts
    725 Views
    No one has replied
  • [solved] QFile and javascript

    1
    0 Votes
    1 Posts
    896 Views
    No one has replied
  • [solved] why dont qml image dont appear on runtime?

    1
    0 Votes
    1 Posts
    725 Views
    No one has replied
  • How to manipulate(animate) one-type image objects in qml from c++?

    1
    0 Votes
    1 Posts
    670 Views
    No one has replied
  • ListElement: cannot use script for property value error [Qt Quick/C++]

    7
    0 Votes
    7 Posts
    11k Views
    R
    Well even though this is ten months old I'll post an answer to this latest question for any future visitors. model is a property on the ListView that lets you walk up the chain to the model from the delegate. The modelData property holds the QObject*. This makes the properties of the object directly accessible in the ListView delegate using the syntax shown that is: @model.modelData.color@ is returning the Q_PROPERTY color property from the DataObject instance.
  • What is the proper things to be done in QQuickItem::updatePaintNode() ?

    1
    0 Votes
    1 Posts
    477 Views
    No one has replied
  • [Solved] How to prevent recompile to see QML-changes?

    6
    0 Votes
    6 Posts
    5k Views
    K
    Thanks again, it is always a pleasure to get such qualified answers. I had this strange misbehaviour, which I described in my first post. To test the problem again, I started the same project from scratch. This time the problem did not occur. So I was able to see my QML-changes at once without recompile. So I think I had a misconfiguration in my old project or there is a (little) bug somewhere in the build-system. @Rolias: Same with me. Having the qml's in the qrc is comfortable. You don't have to care for file locations and so on. @Torgair: If I understand correctly, you bind the shortcut into every application which you develop, so you can edit and test your qml at runtime. Is it correct? Perfect trick. Thanks again Kai
  • QML List fetches DisplayRole from model; how can I change that?

    4
    0 Votes
    4 Posts
    3k Views
    S
    bq. "Doc is here":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-modelviewsdata-cppmodels.html#qabstractitemmodel [qt-project.org], but it looks like lacking sample code :/ The sample code installs on your computer with Qt. On my drive it is: Qt/Qt5.2.1/5.2.1/Src/qtdeclarative/examples/quick/models/abstractitemmodel/ The examples in the source code installed with Qt are incredibly useful. I wasted hours searching for sample code on the Internet that was already on my hard drive.
  • How I can build my app with CODE_SIGN_ENTITLEMENTS?

    3
    0 Votes
    3 Posts
    21k Views
    shavS
    Hi everyone! At last I can post the solution how to use iCloud with your Qt project on Mac OS X. The first you need to understand the iCloud supports only for Mac OS and if your app will ported to any other OS you need think about using something like DropBox. In my case app will supported only Mac OS. In my application I've used iCloudKit API this API has been added in last version of Mac OS 10.10, so you can't use this API in older versions. So let's start our small instruction how to add iCloud Kit to your app. You need to create class with iCloud Kit API. Because iCloud Kit supported Objective-C/C++ you need to create this class using Objective-C/C++. I've prepared my class which you can use in your Qt app. 1.1. Download class from "url":http://dshav.com/apps/CloudKitManager.zip. 1.2. Unzip to source folder of your project. 1.3. Add code to file where you need to use iCloud Kit Api: @ #include "CloudKitManager/qfcloudsettings.h" @ 1.4. How to use: @ QString appName = qApp->applicationName().replace(" ", "").replace("_", "").replace("-", ""); QString str = QString("iCloud.%1.%2").arg(qApp->organizationDomain()).arg(appName.toLower()); QfCloudSettings::defaultManager(str, this); QfCloudSettings::defaultManager()->requestDiscoverabilityPermission([this](bool flag) { if(flag) { //Some code here } }); @ Open your Apple Developer Admin Page and enable to your application iCloudKit service. Convert your Qt project to Xcode project: @ qmake -spec macx-xcode your_app.pro @ This needs because Xcode must create Entitlements file. This file need to use iCloudKit in your project. 4. Create a new script phase: 4.1. Open your_app.xcodeproj in Xcode. 4.2. Select your application target. 4.3. Select "Build Phases" tab. 4.4. Click to "+" button and select "New Run Script Phase". 4.5. Add code like this: @ /Volumes/Documents/Applications/Qt/Qt5.4.0/5.4/clang_64/bin/macdeployqt $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME -executable=$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/Contents/MacOS/$PROJECT_NAME -qmldir=$BUILT_PRODUCTS_DIR/../qml @ Where /Volumes/Documents/Applications/Qt/Qt5.4.0/5.4/clang_64 is a path to your version of Qt. Clean and build your app. This must works! Some issues which could be with open your project to another Mac: Project is empty. This happened because qmake create Xcode project with full path to files. To fix this bug you need to open your_app.xcodeprj/project.pbxproj in any Text Editor and replace full paths to new paths. I recommend to remove all path to new paths. But you should be careful with this. If you have any questions or problem let me know and I'll help you with them. P.S. Now I trying to optimise this steps and removed Xcode from build process. But I still have small issues with codesign of my app bundle. In this case I need to create correct provision and certificate. So I need more time to find solution for QtCreator. I will post new information here.