跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    21 瀏覽
    尚無回覆
  • What's wrong with alignment?

    Solved
    11
    0 評價
    11 貼文
    2k 瀏覽
    raven-worxR
    @r3d9u11 and when you bind the row layout's width to the parent width? RowLayout { width: parent.width ... } So, all Controls on the right side will disappear (because their positions are out of application's width). I don't know why, looks like another bug. Not a bug, the minimumWidth will rise, but never shrink.
  • Nested Repeaters with Loader

    Solved
    5
    1 評價
    5 貼文
    2k 瀏覽
    K
    @sierdzio Thanks!
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    1 瀏覽
    尚無回覆
  • Initialize TextField placeholderText with value received from a signal

    Solved
    2
    0 評價
    2 貼文
    215 瀏覽
    E
    Apparently just a placeholderText: configwatch.patientID Works fine ! Sorry about that, I thought that I had already tried this...
  • View map in in Qt Designer, for Qt mapviewer example

    Unsolved
    1
    0 評價
    1 貼文
    180 瀏覽
    尚無回覆
  • QML trembling delegate in ListView when scrolling

    Unsolved
    1
    0 評價
    1 貼文
    402 瀏覽
    尚無回覆
  • Scaling of QML VideoOutput/ShaderEffect (bilinear vs nearest-neighbour interpolation)

    Unsolved
    2
    0 評價
    2 貼文
    344 瀏覽
    A
    For VideOutput that does the trick: VideoOutput { ... layer.enabled: true smooth: false } Unfortunately, it does't work with ShaderEffetct (the image is still blurry): ShaderEffect { ... layer.enabled: true smooth: false scale = 10 }
  • Access a specific object

    Solved
    2
    0 評價
    2 貼文
    217 瀏覽
    dheerendraD
    property variant items:[] items[i] = comp.createObject(root, {x: i, y: i*50}); Now you can access the any objects in items using index.
  • How to get access to QList<QPair<int, double>> in QML

    Unsolved
    5
    0 評價
    5 貼文
    1k 瀏覽
    P
    @sierdzio I think the url you provided is using a model. Is it possible to expose the QVariantList in the form of ( QList<QPair<int, double>>) to QML without using models. Can someone please provide a sample examples
  • Populating Swipe View Dynamically From Model

    Unsolved
    2
    0 評價
    2 貼文
    543 瀏覽
    A
    OK. Here is where I am with this: I have a QAbstractListModel that holds a QList of pointers to QML objects that I load with QQmlComponent component(&engine, QUrl("qrc:/TestGaugeStyle.qml")); if(component.status() != QQmlComponent::Ready) { qDebug() << "Not Ready: " << component.errorString(); } GaugePresenter *object = (GaugePresenter*) component.create(); QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); Then I add the created component to the model: //GaugePresenterManager is a singleton that is designed to manage the //lifecycle of these gauge styles. It also holds the model reference. GaugePresenterManager::instance()->getModel()->addGaugePresenter(object); When I debug I can see that the model is holding the pointers to the GaugePresenter and everything seems right. This is where I am kind of lost. I tried creating a property Q_PROPERTY(GaugePresenterItemModel* gaugePresenterViewModel READ getModel) and then in QML I assign that property to the model of the SwipeView Repeater. SwipeView { id: swipeView anchors.fill: parent Repeater{ model: GaugePresenterManager.gaugePresenterViewModel } } but nothing is displayed. I imagine it is because the property is a pointer to the model and maybe QML doesn't know how to deal with that? Or maybe this just isn't the right way to do this. The TestGaugeStyle is just a QML document that holds a rectangle with some text that says "test". I am expecting that when I add the TestGaugeStyle to the Model, the SwipeView will display it.
  • Animations

    Unsolved
    4
    0 評價
    4 貼文
    321 瀏覽
    Q
    @Markkyboy Thank you for your code but there should be only two lights, one black and the other green/red. We just need to add a yellow color for one second to the light when the state changes from "go" to "stop". That is, when the state is going to change from "go" to "stop" it firstly stops for one second with the yellow color and then becomes back for the rest of time space and with color black, like normal traffic lights but this specific version has only two lights!
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    8 瀏覽
    尚無回覆
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    12 瀏覽
    尚無回覆
  • SwipeView swipes when it shouldn't

    Solved
    10
    0 評價
    10 貼文
    1k 瀏覽
    VStevenPV
    Sorry for the confusion. I had downgraded from 5.15.2 to 5.12.10 the night I posted the test code, because I was having a problem using root setContextProperty in 5.15.2 in another app of mine. You are correct! I just retried it, and it works. There was a mistake in my local copy of the test code. I was using preventStealing: false (!),then had commented that out. That's not the proper value, and I'm not sure why I used the value false. Thanks for helping me overcome my mistake.
  • QAbstractVideoFilter: enforce pixel format coming from GStreamer

    Solved
    10
    0 評價
    10 貼文
    1k 瀏覽
    SGaistS
    Would you mind sharing the code ? Additional formats can be supported in QtQuick, it requires a shader that converts the data.
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    16 瀏覽
    尚無回覆
  • Creating multiple QML objects simultaneously

    Unsolved
    2
    0 評價
    2 貼文
    262 瀏覽
    Pablo J. RoginaP
    @QTLeearn said in Creating multiple QML objects simultaneously: Qt.createQmlObject Not that I've used it, but from documentation that method will return one object. Returns a new object created from the given qml string which will have the specified parent, or null if there was an error in creating the object. So your example QML string seems not suitable. However, I expect (just my assumption) that multiple nested objects could be created from a QML string, given that just one of them is the parent of the remaining ones.
  • How to notify something outside if the module is loaded by loader

    Unsolved
    2
    0 評價
    2 貼文
    189 瀏覽
    fcarneyF
    Put Splash inside MainWindow.qml and have that file control when the Splash is shown. Add property to MainWindow.qml. You could do this in one file: Component { id: customMainWindow MainWindow { loader: true // add this property to MainWindow Splash { } // add custom splash logic as needed } } Loader { sourceComponent: customMainWindow }
  • TextArea cursor not updated after font size change

    Unsolved
    1
    0 評價
    1 貼文
    173 瀏覽
    尚無回覆