Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • QML MapView

    Solved
    7
    0 Votes
    7 Posts
    942 Views
    KoryK
    Thanks for the help, Kai, your way got rid of the grouped property error [image: 7f603bcd-54bc-4ab1-8b39-1fbeef4531e0.png]
  • Using the QML_ELEMENT macro properly to avoid error "use of undeclared identifier"

    Solved
    5
    0 Votes
    5 Posts
    827 Views
    KoryK
    Yeah that's all working now I was receiving some errors W/default : qrc:/Main.qml:10:1: static plugin for module "URI " with name "URIPlugin" cannot be loaded: Namespace 'URI' has already been used for type registration. GlobalContextModule/pages/SignUp.qml:204 RolesList is not a type Solution to this I believe was to Make sure I hadn't repeated the import statement for our URI from the Parent cmakelists.txt. Where URI refers to URI of our target that we provided to target_include_directories. And our URI is declared in qt_add_qml_module Move the RolesList{} QML element from page in child module to Main.qml where our import statement was. Even though Main.qml loads this page in and in effect, should provide it with what it wants, it didn't for me in practice. Before we used QML_ELEMENT I had an import statement just for RolesList{} in page of child module but now that thing is in our Import URI in Main.qml. If that doesn't make any sense, basically all I'm saying is don't assume classes put inside of main module via QML_ELEMENT and CmakeLIsts.txt get passed down to child modules included into this main module
  • How to transfer drag.active between objects?

    Unsolved
    2
    0 Votes
    2 Posts
    279 Views
    J
    For anybody that cares, I ended up creating the floating icon on top of each gateIcon as it is created: GateIcon.qml: Component.onCompleted:{ floatingGateIcon.fromPalette = fromPalette floatingGateIcon.gateType = gateType floatingGateIcon.parentIcon = gateIcon floatingGateIcon.source = iconSource console.log(gateIcon.x,gateIcon.y) floatingGateIcon.createFloatingIcon(gateIcon.x,gateIcon.y); } then set propagateComposedEvents: true in the gateIcon mouse area.
  • Am I the only one with issues on basic functionality of Qt Design Studio?

    Unsolved
    2
    0 Votes
    2 Posts
    263 Views
    SGaistS
    Hi and welcome to devnet, The forum is not the best place to discuss these issues as it's mainly a user forum. You might want to check the bug report system to see if there's already something that matches your issues. If not, you could consider opening feature requests regarding the points you are mentioning.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • Detected recursive rearrange

    Unsolved
    4
    0 Votes
    4 Posts
    678 Views
    SGaistS
    Hi, I think GammaRay might be useful to find that kind of things.
  • Cannot load pdf in the app works only for the single file

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    R
    That means error so nothing is displayed. https://doc.qt.io/qt-6/qml-qtquick-image.html#status-prop If I use source: StandardPaths.writableLocation(StandardPaths.HomeLocation) + "/qtpdfbug/qtlogo.pdf" It works. While this works only if I use qml6 with file and not when I launch the app. source: "/home/user/qtpdfbug/qtlogo.pdf" Using this always work source: "file:///home/user/qtpdfbug/qtlogo.pdf"
  • Issue with Shadow Blur Rendering in MultiEffect (Qt 6.7.1)

    Unsolved
    1
    0 Votes
    1 Posts
    239 Views
    No one has replied
  • This topic is deleted!

    Solved
    2
    0 Votes
    2 Posts
    32 Views
    No one has replied
  • QML has vertical or horizontal separator control?

    6
    0 Votes
    6 Posts
    6k Views
    RokeJulianLockhartR
    From what I see, the vertical line is a QFrame element with VLine settings. Using stackoverflow.com/review/suggested-edits/36711790, that: separator_line = PyQt6.QtWidgets.QFrame() separator_line.setFrameShape(PyQt6.QtWidgets.QFrame.Shape.HLine) separator_line.setFrameShadow(PyQt6.QtWidgets.QFrame.Shadow.Sunken) ...seems to render in the correct orientation for me: Before [image: bf9500d5-93c8-4aaa-933e-abc512a4cf47.png] Afterward ...albeit invisibly (it should be between "Modify" and "Overflow"): [image: 39f1e90f-e68e-4e48-a36e-c1f28e37f364.png]
  • QML TextArea performance with large data buffers

    Unsolved
    6
    0 Votes
    6 Posts
    713 Views
    B
    @afalsa thanks for those links. I have only looked at the first one and skim read it, but it seems like they ended up with a very similar solution to mine. That is reassuring in the sense that there doesn't seem to be a much simpler approach that I missed. I don't recall finding that page when I had the issue, but I suspect I was grappling with it a year or two before that was written.
  • Why is setPreeditText not directly available in QML?

    Unsolved
    3
    0 Votes
    3 Posts
    314 Views
    jeremy_kJ
    According to the documentation, https://doc.qt.io/qt-5/qml-qtquick-virtualkeyboard-inputcontext.html#preeditText-prop: preeditText : string This property sets the pre-edit text. The property isn't marked read-only, indicating that an application can assign to it.
  • a generic qml label for display of an image and a text

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    SavizS
    @JoeCFD said in a generic qml label for display of an image and a text: any recommendations for making a generic qml label to display an image and a text? If by "image and text" you mean a label that displays an icon (e.g., SVG) alongside text, you can use the IconLabel type. While there is no official documentation for it, you can view its source code. It allows you to assign text, an icon, and even customize the layout. For example, this is how it is used in a Button: Button { id: control property real radius: 0 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) opacity: control.enabled ? 1 : 0.5 padding: 6 spacing: 6 icon.width: 24 icon.height: 24 contentItem: IconLabel { id: iconLabel spacing: control.spacing mirrored: control.mirrored display: control.display // Controls Layout icon: control.icon // Icon text: control.text // Text font: control.font } } If by "image" you mean PNG or other non-icon image types, your best option is to use an Image type alongside a Text or Label type within a layout. I don’t see any other straightforward approach.
  • 0 Votes
    9 Posts
    642 Views
    A
    I decided to follow Bob's suggestion to replace moveRows with removeRows followed by insertRows and it seemed to work out for me. Thank you all for the suggestions.
  • exclude item inside QML Qt Quick Control from interaction

    Unsolved
    3
    0 Votes
    3 Posts
    298 Views
    M
    Thank you, @GrecKo ! That helped a lot. Just adding it as you suggested didn't work, but in combination with the following on the control level works good. containmentMask: QtObject { function contains (point: point) : bool { return control.contentItem.contains(point) || control.indicator.contains(point) } }
  • qmlRegisterTypeSingleton with contextData error while using PySide6

    Solved
    9
    0 Votes
    9 Posts
    652 Views
    SGaistS
    You're welcome ! You know, inverting lines can happen quickly and innocuously :-) Anyway, now you're back on track.
  • Shadow Mapping not working after porting to Qt 6,8

    Solved
    6
    0 Votes
    6 Posts
    695 Views
    SGaistS
    Thanks for the feedback and bug reports !
  • Ripple effect on material style

    Unsolved qml c++ ripple linux qt quick
    3
    0 Votes
    3 Posts
    939 Views
    N
    I am also facing the same issue. Have you found any solution for this?
  • Regarding dynamic graph creation using Shape qml component.

    Unsolved
    1
    0 Votes
    1 Posts
    185 Views
    No one has replied
  • Passing model data from delegate Loader to component in TableView object.

    Unsolved
    12
    0 Votes
    12 Posts
    798 Views
    J
    @Bob64 Thank you, just using 'type' worked! I knew it would be something simple like this. And @GrecKo thanks for the tip, that looks like a better solution so ill definitely look into it.