Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Help with qt design studio

    Unsolved
    1
    0 Votes
    1 Posts
    131 Views
    No one has replied
  • How to pass Analog value in QML

    Unsolved
    1
    0 Votes
    1 Posts
    127 Views
    No one has replied
  • QAbstractListModel methods from QML

    Unsolved
    6
    0 Votes
    6 Posts
    679 Views
    K
    @St-Stanislav readParameters() and writeParameters(). Are they signals or methods ? If they're signals, you'd better create a signal in QML, and connect it to the C++ side It's explained here: Connecting to QML signals If you plan to use ParameterID data type in QML side, don't forget to register it properly in the C++ side. K.
  • ListView: How to know the currentItem has finished its move animation

    Solved
    3
    0 Votes
    3 Posts
    291 Views
    K
    @fcarney Yes, I thought about using an animation sequence...it can work. As I'm using a Behavior animation type, I 've been using the following: Behavior on width { SpringAnimation { spring: 4; damping: 0.4 onRunningChanged: myAnimFinished = (running === false) } } I'll evaluate both solutions in terms of performance.
  • Get current theme highligth colour

    Unsolved
    1
    0 Votes
    1 Posts
    211 Views
    No one has replied
  • QML ChartView lineseries with "blank" points

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    D
    The solution I adopted in the end is to create dinamically a single LineSeries object for every line color, and that works pretty well even if I have to create 40-50 lineSeries objects. I'm not pretty sure that the way I'm adding LineSeries is the best (I don't like the approach I used, but at the moment I don't see other possibilities). When I need to draw the lines what I do is: send a signal from c++ to qml that we need to draw new lines, with the number of lines to be drawn. with a Connections object I intercept the signal in qml and inside a for I create a new LineSeries element using chartView.CreateSeries(). Then I pass the series back to c++, with the number of the LineSeries created, so that I know which points I have to assign the that LineSeries object. I know that is not a clean approach, if somebody has any hints please tell me.
  • Switch that controls other qml files

    Unsolved
    3
    0 Votes
    3 Posts
    327 Views
    F
    I made little changes to my code so that: In the settingsPage.qml file, I have this inside of onToggled: backend.switchValue = toggled In the homePage.qml file, I have this inside one of the rectangles I've created: visible: backend.switchValue() Lastly, in main.py file: customTitleBar = Signal(bool) @Slot() def switchValue(self): return customTitleBar.isToggled What am I doing wrong?
  • Save QML TableView data on file

    Unsolved
    1
    0 Votes
    1 Posts
    178 Views
    No one has replied
  • display pdf in QML Image

    Unsolved
    2
    0 Votes
    2 Posts
    496 Views
    fcarneyF
    Either buy the PDF component separate or license the commercial version of Qt. It is not included in the open source version.
  • Using ColumnLayout breaks Label wrap/resize

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    mzimmersM
    Update: by process of elimination, I traced the cause to my use of ColumnLayout. Changing topic title accordingly. EDIT: So, it appears that the missing ingredient was a Layout.preferredWidth: Label { Layout.alignment: Qt.AlignHCenter text: changeConsumablesViewModel.posterModalSubHeading width: parent.width * 0.9 Layout.preferredWidth: width fontSizeMode: Text.Fit minimumPixelSize: 18 font.pixelSize: Theme.plateLabelLargeFont.pixelSize wrapMode: Text.Wrap } produces this: [image: f402a6ef-db23-40f7-9c29-c52749ba903f.PNG] I didn't realize that I needed to apply Layout properties to the individual elements of a Layout; but evidently I did.
  • Load encrypted .mesh files

    Unsolved
    1
    0 Votes
    1 Posts
    185 Views
    No one has replied
  • How can I enable the native Windows style?

    Unsolved
    2
    0 Votes
    2 Posts
    902 Views
    JKSHJ
    Hi, and welcome! @edfasefwfawd said in How can I enable the native Windows style?: Some of the Qt 6 material talks about native desktop styles. I'd like to use the Windows one. How can I enable it? If I'm not mistaken, it's already enabled by default. Just create a basic Qt Quick project and build it with both Qt 5 and Qt 6: import QtQuick.Window 2.15 import QtQuick.Controls 2.5 Window { width: 640 height: 480 visible: true Button { text: "Hello" } } On Windows 10, when using Qt 5, the button is large, flat, and always gray. However, when using Qt 6, the button is smaller with a blue-ish hover effect, just like native Windows buttons.
  • QML Image object, unable to load file

    Unsolved
    5
    0 Votes
    5 Posts
    501 Views
    fcarneyF
    This might help too. It has this described: Image { source: encodeURIComponent("/tmp/test#1.png") }
  • Model Roles with children C++ classes

    Solved c++ qml
    8
    0 Votes
    8 Posts
    775 Views
    K
    @fcarney Thanks. It solves my issue !
  • version number for QML imports

    Solved
    5
    1 Votes
    5 Posts
    3k Views
    sierdzioS
    @fcarney said in version number for QML imports: But it can affect properties available in objects: Yes, and OP is aware of it: I have tended to use the lowest import version number I can, so I keep at the most minimum QML "API" for the features I need So in my answer I focused on other stuff. Of course, you should not lower the number so much that you start loosing features you need :-)
  • Multiple warning messages when using split() in Qt 5.15.2

    Unsolved
    4
    1 Votes
    4 Posts
    4k Views
    mzimmersM
    @kkoehne ah, after reading your reply, the error message makes (a little) more sense. That's not a great error message though...both it and the docs section talking about the deprecation could use some rewording, IMO.
  • QMLDIR and Singleton

    Unsolved
    1
    0 Votes
    1 Posts
    195 Views
    No one has replied
  • Resizing of QQuickView very slow and flickering

    Solved
    4
    2 Votes
    4 Posts
    4k Views
    R
    @penpen said in Resizing of QQuickView very slow and flickering: I've found some solution that is not perfect but muche better than default behavior QSurfaceFormat format; format.setSwapInterval(0); format.setRenderableType(QSurfaceFormat::OpenGL); view.setFormat(format); Ho, i have the same problem and the same GPU: 1060 6gb. Some solution?
  • Custom options from Qml Image to a custom ImageFormat

    Unsolved
    4
    0 Votes
    4 Posts
    382 Views
    fcarneyF
    Another route is creating a custom image provider. With that you choose how to interpret the end of the url. The data will be provided to the Image item via a handler.
  • Edit TableView Content from other QML File

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