Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.7k Posts
  • qml app does not run without any error and but does run in <qtVersion>\mingw\bin

    Solved
    5
    0 Votes
    5 Posts
    634 Views
    Q
    @SGaist it worked fine. thank you so much (: ❤️
  • QML Svg in qt 5.15 static build, using CMake

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    B
    The solution for me was in addition to including Qt5::Svg in find_package and target_link_libraries, eg: find_package(Qt5 REQUIRED COMPONENTS Core Quick Qml Xml Charts Gui Svg QuickControls2) target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick Qt5::Qml Qt5::Xml Qt5::Charts Qt5::Gui Qt5::Svg Qt5::QuickControls2) To also include the following when statically linking Qt 5.15: qt5_import_plugins(${PROJECT_NAME} INCLUDE Qt5::QSvgPlugin) That resolved errors such as "QML ButtonIcon: Error decoding: qrc:/resources/images/add-white-36dp.svg: Unsupported image format"
  • Make Independent Popup

    Solved
    4
    0 Votes
    4 Posts
    430 Views
    PadawanP
    @GrecKo Thanks I've gotten it sorted out. I encapsulated the component i wanted to show inside a window and created it using Qt.createComponent() var playListComponent = Qt.createComponent("CustomPlaylist.qml") var window = playListComponent.createObject(rootWindow) window.show() The root element of CustomPlaylist.qml is a Window [image: 4c1cfe8b-9403-4008-9066-c4ec97b8f368.png]
  • why doesn't it draw PathLine ??

    Unsolved quick qt quick qt5.11
    2
    0 Votes
    2 Posts
    887 Views
    B
    If I understood correctly, you want to draw a red line. The purpose of Path is to position elements through a path. Think of a row or a column that's not straight. You can understand better if you run the first example from this tutorial. To draw paths you need Shape. import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Shapes 1.12 Window { width: 640 height: 480 visible: true title: qsTr("Редактор персонажей") Shape { ShapePath { strokeColor: "red"; // it works :) startX: 0; startY: 100 PathLine { x: 640; y: 480 } } } }
  • How to show multiple Popup on a window? (for ToolTip)

    Solved
    3
    0 Votes
    3 Posts
    550 Views
    W
    @GrecKo Nice and good example! I can solve my problem. Thanks.
  • Using of property mouse.accepted

    Solved
    4
    1 Votes
    4 Posts
    3k Views
    GrecKoG
    not that for a single parameter you can get rid of the parenthesis, mouse => { ... } works
  • "ValueAxis.tickInterval" is not available in QtCharts 2.3.

    Solved
    3
    0 Votes
    3 Posts
    380 Views
    S
    It works ! Thanks (I don't understand it either...)
  • Qt Quick QML Types in QtQuick 2.11 ??

    Solved qml types
    2
    0 Votes
    2 Posts
    505 Views
    raven-worxR
    @timob256 you mean this? https://doc.qt.io/archives/qt-5.11/qtquick-qmlmodule.html
  • Fonts, again. Different appearance on different platforms. Same font.

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    GrecKoG
    That's how font works in every UI system, there is a fallback behavior. As for why there is both font.family and fontInfo.family, it's because it makes developers life easier. You can actually see if the chosen font differs from the one that was set without having to store the expected font somewhere else. For the font family you can also gives a very vague one like "serif", "sans-serif", "monospace" and seeing what the font matched with fontInfo might be important. It would be weird to do font.family = "sans-serif"; and then getting "DejaVu Sans" back when querying font.family, wouldn't it? QML is declarative, so making font.family a function won't be very practical and give much advantages. You already have your feedback in a declarative way, I really don't see how an imperative API would be any better? Do you have a pseudo code example of what your perfect API would look like?
  • TableView header hides first elements

    Unsolved
    3
    0 Votes
    3 Posts
    723 Views
    sudarshandS
    Use topMargin property of Table View.
  • Problems with ScrollBar and ListView

    Solved
    2
    0 Votes
    2 Posts
    913 Views
    C
    I figured it out. For anyone who's interested. If you set the visibility of the contentItem to be: visible: theListView.contentHeight > theListView.height that should do the trick.
  • Dialog and DropArea issue

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    G
    This is an annoying problem and I'm struggling with it at the moment. Did anyone manage to find a proper workaround to it?
  • Qt Creator: qml.qrc with different prefix, problem in design editor

    Unsolved
    1
    0 Votes
    1 Posts
    214 Views
    No one has replied
  • QList as qml model

    Unsolved
    2
    0 Votes
    2 Posts
    324 Views
    raven-worxR
    @Cyrille-de-Brebisson Q_PROPERTY(QList<MyObj*> liste READ getliste NOTIFY listeChanged) now emit the listeChanged signal everytime you change the list If you would implement a QAbstractListModel subclass you would have more control of rearrangements etc.
  • 0 Votes
    4 Posts
    1k Views
    raven-worxR
    @Tee_ normally a pro file results in a separate target (executable or library). Even if you "combine" them with a subdirs project. So your AppUi project must link against the AppLib
  • GTK style File Explorer on Windows OS

    Unsolved
    1
    0 Votes
    1 Posts
    200 Views
    No one has replied
  • ChartView/ValueAxis - How to NOT label the maximum value tick on the ValueAxis

    Unsolved
    4
    0 Votes
    4 Posts
    355 Views
    fcarneyF
    You could draw a line on top. Not ideal. Edit: Width of 1 rect with border.
  • Conditional Import

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    raven-worxR
    @caicx said in Conditional Import: import QtGraphicalEffects 1.0 // Required by Qt 5.x.x vs import Qt5Compat.GraphicalEffects // Required by Qt 6.x.x yes and? Since the major version of Qt has changed you should also advance with your project, instead of importing a compat module of a previous version for the whole lifespan of Qt 6. The compat module is intended to be used as a quick solution until the porting of your application to Qt6 has finished
  • Key press events are not handled in e.g. Qml TextField but eventFilter receives it

    Unsolved
    1
    0 Votes
    1 Posts
    168 Views
    No one has replied
  • How to identify the Qt libraries are built with open source or commercial licenses

    Solved
    3
    0 Votes
    3 Posts
    456 Views
    P
    @jsulm - Thank You