Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.8k Posts
  • How to select all text of a textfield only when got focus from pressing tab

    Solved
    2
    0 Votes
    2 Posts
    409 Views
    D
    Found solution onFocusChanged: function(focus) { if(focus && focusReason === Qt.TabFocusReason) selectAll() }
  • QtQuick3D RuntimeLoader with windeployqt

    Unsolved
    1
    0 Votes
    1 Posts
    147 Views
    No one has replied
  • Qt Quick in Visual Studio 2022 build errors and assertion throw

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    M
    Good morning, thank your for your reply. These should not be necessary, and might be the reason for your double-ups. What's the purpose of adding these lines? The double-ups are in fact happening on a new project without these lines. However, adding these will allow me to build the project again so that it compiles on the second try. That is really scary and sounds extremely fragile, so I'm hoping for a solution. The purpose for these lines was to deparate the build output in Qt Creator into a debug and release folder, thinking it would affect the migration to a Visual Studio project in some manner since it looked like the Qt VS Tools project was trying to RCC in both debug and release mode even though I have the Debug x64 configuration selected. There was no way to suppress this behavior and only RCC debug files. As a short follow-up after writing this paragraph, here's a description of this issue: The build might fail in the first place since it searches for *.qm files in the /release output folder when building in debug mode Starting a build and letting it fail in release mode fixes this issue Restarting the build in debug mode will display the following warning C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(514,5): warning MSB8028: The intermediate directory (build\debug\.obj\) contains files shared from another project (Hydra.Frontend.vcxproj). This can lead to incorrect clean and rebuild behavior. After that it will fail with the following errors: 1>\Hydra.Frontend\build\Debug\.qrc\qrc_qmake_qmake_qm_files.cpp : fatal error C1083: Cannot open compiler generated file: '\Hydra.Frontend\build\debug\.obj\qrc_qmake_qmake_qm_files.obj': Permission denied \Hydra.Frontend\build\Debug\.qrc\qrc_qmake_qmake_immediate.cpp : fatal error C1083: Cannot open compiler generated file: '\Hydra.Frontend\build\debug\.obj\qrc_qmake_qmake_immediate.obj': Permission denied Building again fixes this issue if and only if the lines added to the project file were present. The fact that an assertion occurs likely indicates that something has gone wrong, or an assumption has been violated. So I wouldn't simply dismiss it as an annoyance. Does the assertion occur with a very basic "hello world" Qt Quick project? It does in fact not. Though since it happens in the call of creating a window and appears to be thrown on a separate thread and I was so far unable to isolate the issue I feared it would become a time sink. So, how about overcoming fear, I'm gonna investigate this issue further and will follow up with a resolution or perhaps a more detailed description. Update 1) The issue is related to my QML Code/Native registered components Update 2) Found the root cause for the assertion. I have a QML component that defines the following two properties: property bool isToggle: false property bool toggled: false If any of the two properties is named differently then the assertation is not triggered. This seems extremely weird to me and looks to me like unwanted behavior
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • Passing SVG from C++ to QML

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    A
    @Soheil Do you happen to know if this blob-encoding is an officially supported way to display images? For large images, the extra work of encoding the byte array into a QUrl seems excessive. For small SVGs, this might be a good solution for me.
  • This topic is deleted!

    Solved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • TextFields with masks or validators seem unusable

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    StokestackS
    Thanks for the replies, guys. I'm pretty new to QML, so the binding example is very helpful. I still think these text controls desperately need improvement, though.
  • Button not filling Rectangle

    Unsolved
    5
    0 Votes
    5 Posts
    648 Views
    S
    It's because the material style sets non-zero values for xxxInset properties. Set leftInset, rightInset, topInset, bottomInset values to 0 and the button appears to fill its parent.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • QT QML realtime chart

    Unsolved qml qml c++ qml binding chartview chart
    5
    0 Votes
    5 Posts
    2k Views
    V
    @J-Hilk Ok that's enough I think. One more question what will happen to scrolleft(). If I keep on incrementing these, will there be any increase in runtime memory or processor load?
  • Title attribute of html tag

    Unsolved qml label html title
    8
    0 Votes
    8 Posts
    3k Views
    fcarneyF
    The tag support in Qt objects is really simplistic and nowhere near like a browser. If you want browser type html use webengine. I think webengine is pretty heavy and probably not what you want.
  • In-App Purchasing of Registered Product (google store)

    Unsolved purchasing store android inapp registertype
    2
    0 Votes
    2 Posts
    530 Views
    Fitndex-developerF
    @Fitndex-developer said in In-App Purchasing of Registered Product (google store): com.fitndex.theApp Hello Everyone, since there has been no activity on this post, I thought I'd let everyone know that this setup works with one change in the code: do not include the app name in the identifier. identifier: 30day_data_access ... is correct identifier com.fitndex.theApp.30day_data_access ... is wrong On google play I was missing the following. I was in internal testing and the app had not been published, i published to closed testing. Add licence testers to the app in google play console (this is different than the release track email list) If using the same app version code as the published version, testing will work, even when plugged in for debug, if you are logged into the tester gmail account. I took a crack at developing subscriptions in java, and for me, that is going to take a while but I will finish (the jni messenger example in android extras helps start with communicating with java if you are new to that), Qt purchasing makes life a lot easier just most of your work is going to be on the google play console side when dealing with Qt Purchasing. So if things are not working, check your settings with google (or apple), that is most likely it. Qt purchasing does not handle subscriptions, it will never find your subscriptions no matter what. The reason for that is the developers could not come up with a platform independent solution for subscriptions. The community needs to figure this one out for everyone. An example anyone? Since monetization is so important; and documentation/examples on qt purchasing are minimal, I hope this helps some of you!! I could have used something like this when I was working on it. FITNDEX HOME now we are on track to launch this summer. You can join the beta on website. Lets help each other get to market. The more money we all make, the better Qt will get, I promise. Steve
  • Setting an icon for the QML app (the APK file)

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    J.HilkJ
    @qcoderpro said in Setting an icon for the QML app (the APK file): Did you find the first error I sent in the first post here trivial? Probably that may cause later issues. like I said, I'm not using Qt7 there might be a bug with that, but I usually also do not check that checkbox, top copy the files. Was never really necessary :D
  • 0 Votes
    1 Posts
    134 Views
    No one has replied
  • accu gauge

    Solved
    2
    0 Votes
    2 Posts
    173 Views
    S
    Solved :-) the problem was the tickmarkStepSize : 4 Rectangle { x : 70 y : 400 width: 200 height: 50 color: "#808080" Gauge { id: accu anchors.fill: parent anchors.margins: 10 orientation : Qt.Horizontal tickmarkStepSize : 0.5 tickmarkAlignment: Qt.AlignBottom minimumValue: 11 maximumValue: 13 value: 12.6 style: GaugeStyle { valueBar: Rectangle { implicitWidth: 10 color: (accu.value <= 12) ? "red" : (accu.value <= 12.5) ? "yellow" : "green" } } } }
  • How to Send QML image to C++ side

    Solved
    5
    0 Votes
    5 Posts
    777 Views
    SGaistS
    Are you trying to implement something like described here ?
  • First attempt to use Qt networking on QML apps

    Unsolved
    28
    0 Votes
    28 Posts
    3k Views
    Q
    Is the problem still ambiguous, please? I tried hard but can't find the issue. :(
  • How Disable ScientificNotation on TextField

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    B
    It works, thank you for your answers, @J-Hilk 's solution fits my need more, thank you anyway for your answer @lemons :)
  • Qt6 QML book example source

    Solved
    3
    0 Votes
    3 Posts
    433 Views
    J
    That works. Thank you.