跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • QML ToggleButton and StatusIndicator in Qt6

    Unsolved
    1
    1 評價
    1 貼文
    632 瀏覽
    尚無回覆
  • How to avoid a circular dependency in Qt creator

    Unsolved
    7
    0 評價
    7 貼文
    755 瀏覽
    M
    @sierdzio I want to avoid a circular dependency. If I inherit QObject to ProessSlot and send a signal to Process , a circular dependency doesn't happen as you told me.The reason why I make this component is that I have multi classes like ProcessSlot which Process delegates and multi classes which a child class like ProcessSlot delegate. And I want to utilize "QmlAcessSignal" in child class and send signals in that.
  • How to create LED indicator in QML

    Solved
    5
    0 評價
    5 貼文
    2k 瀏覽
    P
    @ndias said in How to create LED indicator in QML: Hi @James-A, You can use StatusIndicator QML Type if you are using Qt5: https://doc.qt.io/qt-5/qml-qtquick-extras-statusindicator.html Regards Hi, A bit related - I have a project that used Qt5.13 and the StatusIndicator QML type. After upgrading the project to Qt6, I now get the error: module "QtQuick.Extras" is not installed I have since discovered, that these controls have moved to the Enterprise Controls? https://doc.qt.io/QtQuickEnterpriseControls/qml-qtquick-enterprise-controls-statusindicator.html So I am not able to use it in this standard Open Source project anymore?
  • Use Qt5Compat.GraphicalEffects in Qt6 and QtGraphicalEffects in Qt5 in the same QML file

    Unsolved
    1
    0 評價
    1 貼文
    287 瀏覽
    尚無回覆
  • SoundEffect on Android

    Solved
    2
    0 評價
    2 貼文
    317 瀏覽
    mrdebugM
    The audio track must be at 48000 Hz
  • Animations in a state (QuickUltralite)

    Unsolved
    2
    0 評價
    2 貼文
    190 瀏覽
    jeremy_kJ
    @reneb86 said in Animations in a state (QuickUltralite): I want to create "states" for my character. States like "idle", "waving", "angry", "shouting", "talking", "walking", etc. Now the mechanisms for states are there, and even transition animations between states are there. But it seems to be impossible to create any kind of animation while the character stays within a state. I might want my "talking" state to be as long as 3 minutes, if that's how long the dialog is. But within those 3 minutes, there should be an animation looping. But states seem to always be entirely static. I tried to define States within the top item of the character. I can define a lot of it. But I can't define the animation within the state it belongs in it seems. The animations types are not allowed to live in State or PropertyChanged. Now. I may be able to solve this by defining states in every Image. But that is the wrong kind of encapsulation in my mind. The logic of waving animations, should be located in the same place, not spread across many different images. It can't seem to be done in QML though. Or am I missing something? My inclination is to: Define the animations outside of the states definitions, but adjacent in the QML file. Use a PropertyChanges or StateChangeScript to set the Animation's state to running and adjust loops if appropriate.
  • How to use FolderDialog in Qt 6.2

    已移動 Unsolved
    2
    0 評價
    2 貼文
    427 瀏覽
    B
    @AndreyBastien I believe new dialogs have just been introduced in 6.2 if you are able to use that version.
  • How to create a Visio type interface with QML?

    Solved view workflow stingray studio user interface
    3
    0 評價
    3 貼文
    875 瀏覽
    jeanmilostJ
    Thank you very much for the tip, this looks good and is effectively the best option I know until now.
  • 'Binding loop detected for property "layoutHeight" after adding a FileDialog

    Unsolved
    6
    0 評價
    6 貼文
    3k 瀏覽
    KroMignonK
    @Rufledore said in 'Binding loop detected for property "layoutHeight" after adding a FileDialog: I have the same issue and I don't know how to proceed. Take a look at this tutorial https://www.youtube.com/watch?v=aSMEcAmcPDc This will help you to understand binding loops, and perhaps to find out what's going wrong.
  • Text.RichText <img> error

    Unsolved
    2
    0 評價
    2 貼文
    181 瀏覽
    MarkkyboyM
    I'll go out on a limb here and say your syntax is wrong. I tackled this sometime ago for a client. I got there eventually. Your line for 'text'; text: '<img src="myimage.jpg" height="10" width="10">' Should look like; text: `<img src='myimage.jpg' height='10' width='10'>` The difference is not noticeable immediately, but looking closer, you'll notice that we have to use a backwards tick ( ` ) top open and close our line of text. Hope this helps. . . Here's how it looks from my project using a wifi logo image in a line of text; [image: 8691ad55-57ec-4fe3-bd69-a5a0aadcc6a2.JPG]
  • how to edit the property of dynamically created object?

    Solved
    2
    0 評價
    2 貼文
    293 瀏覽
    sierdzioS
    You need to expose the text as a property. The id you set in your QML file is local - visible only inside of that same file. When you try to access it from another file (main.qml), it will never work. Does not matter if it is a dynamic component or not. So, for example: //dyRec.qml Rectangle { property alias text: rectText.text id: rect TextEdit { id: rectText text: qsTr("Default") } } // main.qml var dyRect = Qt.createComponent("dyRec.qml") var dyRectObj = dyRect.createObject(root) dyRectObj.text = qsTr("1111")
  • GridLayout equal size Text and Rectange

    Unsolved
    3
    0 評價
    3 貼文
    473 瀏覽
    F
    @AxelVienna I would want my grid columns equal size. The text is not big, there is no need to allocate 90% of grid space for text. Run this example, you will see. Anyway, fixed this by setting preferredWidth to 0 for text. But the inconsistency is annoying.
  • 0 評價
    4 貼文
    541 瀏覽
    J
    Its working now, due to main.cpp it didn't work. Thanks a lot. can I place those speed values in lineseries chart instead of Listview can i take lineseries chart
  • Memory use with repeated creation/destruction of ListView's

    6
    0 評價
    6 貼文
    5k 瀏覽
    JoeCFDJ
    @Hornsj2 you may need to make a debug build of Qt in order to see the leaks of Qt code. Often people install Qt release build and will not be able to see the leaks of Qt.
  • can i give a string for in place of regExp in QML

    Solved qt5 qml regex
    2
    0 評價
    2 貼文
    1k 瀏覽
    Gojir4G
    Guess you can give the string to RegExp constructor RegExpValidator {id:decimal_validator ; regExp: new RegExp(reg_expression)} Edit: Another point, I think you don't need to add extra "/" character if you define your regex using string. I think it should be either : property string reg_expression: "[0-9]+" or property RegExp reg_expression: /[0-9]+/ Note also you can use "\\d+" or /\d/ instead of "[0-9]+" for your regex You may also be interested by this great website for developing and testing regex: https://regex101.com Edit2: Correction of my stupid mistake of my first edit. regex for digit character is obviously \d and not \w
  • Popup QML Window with Transparent background, changed 5.14->5.15->6.2

    Unsolved
    5
    0 評價
    5 貼文
    1k 瀏覽
    A
    @antiocles @GrecKo Did you able to fix this issue on macOS? As mentioned earlier this issue is only on macOS.
  • QMl display hexadecimal

    Unsolved
    6
    0 評價
    6 貼文
    2k 瀏覽
    S
    satyanarayana143 18 minutes ago In Main.cpp qmlRegisterType<PowerQualityMain>("PowerQualityMain",1,0,"PowerQualityMain"); In PowerQualityMain .h typedef struct { /* Power Quality Statistics */ uint32_t avrms; uint32_t bvrms; uint32_t cvrms; uint32_t avrmsone; uint32_t bvrmsone; uint32_t cvrmsone; }RegDataBuffer; RegDataBuffer m_pRegDataBuffer; Updatedat8ksps m_pUpdatedat8ksps; In PowerQualityMain .cpp filled data to structure m_pRegDataBuffer.birms = m_pUpdatedat8ksps.birms; m_pRegDataBuffer.cirms = m_pUpdatedat8ksps.cirms; m_pRegDataBuffer.avrms = m_pUpdatedat8ksps.avrms; m_pRegDataBuffer.bvrms = m_pUpdatedat8ksps.bvrms; m_pRegDataBuffer.cvrms = m_pUpdatedat8ksps.cvrms; In Qml i tried to display like this not Working PowerQualityMain { id:m_pPowerQualityMain console.log("m_pRegDataBuffer.cvrms",(m_pPowerQualityMain.m_pRegDataBuffer.cvrms) } how to display in Qml
  • How to animate layoutDirection change in GridView/ListView?

    Unsolved
    1
    0 評價
    1 貼文
    159 瀏覽
    尚無回覆
  • How to solve QML ToolButton Icon blurred?

    Unsolved
    1
    0 評價
    1 貼文
    266 瀏覽
    尚無回覆
  • Position of an element in nested canvases in QML

    Unsolved
    2
    0 評價
    2 貼文
    259 瀏覽
    J.HilkJ
    @FrostedCookies said in Position of an element in nested canvases in QML: why is the x and y value not relative to the parent canvas but rather the root canvas? because it isn't. And you see that, as soon as you actually paint the whole 2nd canvas onPaint: { var ctx = getContext("2d"); ctx.fillStyle = Qt.rgba(1, 0, 0, 1); ctx.fillRect(0,0,width,height);// instead of ctx.fillRect(100,100,width,height); }