Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Static Library & use QML_ELEMENT to Expose the classes

    Unsolved
    3
    0 Votes
    3 Posts
    373 Views
    dheerendraD
    Further investigation on this. Some how we need to load the staticlibrary. On Linux 6.4.3 Q_INIT_RESOURCE(MyLib). This automatically loaded the libary & called qml_register type. Windows 6.61 - Q_INIT_RESOURCE(MyLib) - This gave me linker error saying that qInitResource_MyLib() is not defined. I just created the object from C++ class present in the library. It worked. We don't have to modify with extern "C". Not required.
  • Passing parameters to ffmpeg while using QtMultimedia

    Unsolved ffmpeg qmultimedia qml
    4
    1 Votes
    4 Posts
    1k Views
    J
    This will be fixed in the upcoming Qt 6.8 release, and is back-ported to 6.7.2. See https://bugreports.qt.io/browse/QTBUG-125006, which adds a check for the QT_FFMPEG_PROTOCOL_WHITELIST environment variable, which the user can set to override the whitelist with their own.
  • Text Width

    Moved Unsolved
    4
    0 Votes
    4 Posts
    390 Views
    G
    @Shankarlinga-M thank you i solve that
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Problem with QML_ELEMENT for classes in subfolder of project

    Solved
    3
    0 Votes
    3 Posts
    357 Views
    shavS
    @Anumas Thanks for the answer! Added subfolder to INCLUDEPATH is help to me.
  • GrabToImage on scaled desktop for Windows

    Solved
    10
    0 Votes
    10 Posts
    877 Views
    Axel SpoerlA
    Thanks for sharing! It’s actually a bug, which the workaround clearly demonstrates.
  • QML Page Transition

    Unsolved
    2
    0 Votes
    2 Posts
    252 Views
    A
    Why are you closing the view, then? I don't think you need to. Instead of closing it, replace the current item in the StackView (like you do in stackView.push(Qt.resolvedUrl("qrc:/qml/MainRootWindow.qml"))) . So remove this screen.visible=false By default, StackView implements different transition for different events like popEnter, pushExit, ect. Here's an example of how to implement your own transitions: https://doc.qt.io/qt-6/qtquickcontrols-customize.html#customizing-stackview
  • Qml set context property for child item

    Unsolved
    1
    0 Votes
    1 Posts
    155 Views
    No one has replied
  • QML page transition

    Unsolved
    3
    0 Votes
    3 Posts
    298 Views
    C
    @GrecKo Thank you I will try.
  • Problem with adding another qml file

    Solved
    4
    0 Votes
    4 Posts
    344 Views
    A
    I found solution without creating resource. The pro file must by eddited like this with example in my example with Kafelek.qml After space write filename with extension in resource.files :) QT += quick SOURCES += \ main.cpp resources.files = main.qml Kafelek.qml resources.prefix = /$${TARGET} RESOURCES += resources # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target DISTFILES += \ Kafelek.qml \ images/logo.png
  • [BUG] QML: Touch-Button not working inside Popup

    Unsolved
    3
    0 Votes
    3 Posts
    389 Views
    J
    Yes, that works. Thank you!
  • QGroundControl add a new QML page

    Unsolved
    2
    0 Votes
    2 Posts
    189 Views
    No one has replied
  • Listview optional autoscroll

    4
    0 Votes
    4 Posts
    438 Views
    S
    The issue you're encountering is likely due to the positionViewAtEnd function being called by default when the checkbox is not checked. This causes the ListView to move, potentially resetting its position. To fix this, you can store the current position of the ListView before making any changes and then restore it if the autoscroll is disabled. Here’s an alternative approach: ListView { id: listView ... property int savedPosition: -1 onCountChanged: { if (followCheckbox.checked) { Qt.callLater(positionViewAtEnd) } else { if (savedPosition >= 0) { listView.contentY = savedPosition } } } onContentYChanged: { if (!followCheckbox.checked) { savedPosition = listView.contentY } } } savedPosition: Stores the current scroll position of the ListView. onCountChanged: Checks if the autoscroll is enabled. If so, it scrolls to the end; otherwise, it restores the saved position. onContentYChanged: Updates the saved position whenever the contentY changes, but only if the autoscroll is disabled. This should prevent the ListView from unexpectedly scrolling to the top when the checkbox is unchecked.
  • QT Designer Error

    Unsolved
    1
    0 Votes
    1 Posts
    137 Views
    No one has replied
  • Access enums defined in non-Qt C++ class.

    Unsolved
    2
    0 Votes
    2 Posts
    255 Views
    B
    You need to use Qt facilities to expose them to QML, the same as if you wanted to call a C++ function from QML. If you are unable to modify the existing C++ code, I would suggest introducing a new Qt-based enum type that mirrors your existing type, expose that to QML, and convert between the two types somewhere appropriate in your backend code.
  • Inner Shadow

    Unsolved
    6
    1 Votes
    6 Posts
    808 Views
    M
    Tried manually copying the built Design Studio component files (under build/lib, build/modules. and build/share/qt/qml) to the corresponding places in my Qt install (Qt/6.7.2/macos/lib, Qt/6.7.2/macos/modules, Qt/6.7.2/qml), and now Creator will auto-complete the QtQuick.Studio.DesignEffects module contents, but trying to preview the the QML file with the qml tool still gives an error: QQmlApplicationEngine failed to load component file:///Users/matt/QtProjects/Test/ShadowTest.qml:2:1: module "QtQuick.Studio.DesignEffects" is not installed
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Create widget scroll animation

    Unsolved
    4
    0 Votes
    4 Posts
    339 Views
    GrecKoG
    You could do this with ShaderEffectSource
  • Two text area scroll with one Scroll Bar / view

    Solved
    2
    0 Votes
    2 Posts
    221 Views
    AdithyaA
    Found the solution by adding scroll view to both textarea and adding ScrollBar.vertical: property with a Scroll bar and assigning postions on onPositionChanged to both the scroll views when any one is scrolled
  • Qt6 Gradient Text

    Unsolved
    1
    0 Votes
    1 Posts
    122 Views
    No one has replied