Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Qt Quick or QWidget in a tight memory constraint Android device?

    Unsolved
    8
    0 Votes
    8 Posts
    746 Views
    Sunita MarshalS
    @J-Hilk Yes, I know Qt apps are so memory hungry but I need an advice on choice of new QML or old QWidgets - what will take less memory? I've no plan to make my Android app any fancy or themed - just simple plain controls will be included, and some SQLite database access.
  • Animation working in reverse ??

    Unsolved
    3
    0 Votes
    3 Posts
    762 Views
    A
    OK, I think I've cracked it but I'd appreciate it if someone can advise me if I've come up with the best solution. It appears that at the time of creation the root object of ScreenSaver.qml has dimensions of 0x0 and as a result, the properties of SequentialAnimation are calculated as negative values and are passed down to the to property of the enclosed PropertyAnimation objects. I got round it by adding a targetHeight and targetWidth property to the root item in ScreenSaver.qml and then set these values to the width and height of the main window in main.qml I would be interested if others would have done it differently?
  • Qt Design Studio Flow Mode not working!

    Unsolved
    2
    0 Votes
    2 Posts
    640 Views
    leenamiettinenL
    Hello! Could you add a link to the example that you followed if it is publicly available online? Did you follow the instructions in the Qt Design Studio Manual: https://doc.qt.io/qtdesignstudio/studio-app-flows.html#adding-flow-items Specifically, it is important to use the wizard template to create the flow view and all flow items: File > New File or Project > Files and Classes > Qt Quick Files > Flow Item Dragging and dropping a Flow Item from the Library to your project is only supported for the purpose of adding states to a flow item.
  • Drag cross window

    Solved
    15
    0 Votes
    15 Posts
    2k Views
    DanimaD
    @Danima I solved that problem for windows platform. https://github.com/hoss291069/Qml-Drag-Drop-Between-window.git
  • JWT authenication in qml

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

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • How to display a QPixmap/QImage in QML?

    Solved
    15
    0 Votes
    15 Posts
    25k Views
    J
    Thank a lot for your code example. Really appreciate.
  • Load image from disk

    Solved
    2
    0 Votes
    2 Posts
    469 Views
    ODБOïO
    hi @qcoderpro source : Qt.resolvedUrl("file:///C:/Users/QtCoder/Desktop/Captures/4.png")
  • How to slide ListView to the end and start from beginning?

    Solved
    3
    0 Votes
    3 Posts
    556 Views
    B
    @LeLev thanks dude. That exactly what I need....
  • How to pass the tab focus to the first visible item in a ListView?

    Unsolved focus tab order list view
    1
    0 Votes
    1 Posts
    609 Views
    No one has replied
  • 0 Votes
    1 Posts
    328 Views
    No one has replied
  • setting arguments in reused QML file

    Solved
    6
    0 Votes
    6 Posts
    503 Views
    ODБOïO
    @mzimmers You're welcome :) BTW "variant" qml type is obsolete. If possible, you should use "var" instead see here https://doc.qt.io/qt-5/qml-variant.html
  • 0 Votes
    2 Posts
    223 Views
    jsulmJ
    @CeDeROM said in Not enough stack space available for QML. Please increase the process stack size to more than 256 KBytes.: any hints? Any more information? What is this app? Is it written by you? What Qt version on which OS?
  • Anchors or SetWidth/Height of a component

    Unsolved
    3
    0 Votes
    3 Posts
    783 Views
    GabrielRRG
    Here are basically the two methods you posted. There are several ways to handle the implementation without any real different but you need to keep in mind what could happen depending on your implementation. On the first method you reduce the child width/height by 2, meaning that this rectangle will be aligned with the bottom and right of both rectangles but anchored to the top and left of the parent rectangle. This is fine but, you could run into errors since it would be easier just to set the bottom and right anchors and the result will be the same without the use of any margin. Method1: Rectangle { id:mainRect width:1280 height:720 Rectangle { width: mainRect.width - 2 height:mainRect.height - 2 anchors: { top: parent.top topMargin: 2 left: parent.left leftMargin: 2 } } } The method 2 has a problem, since you set a margin = 2 for top/bottom/left/right your child rectangle won't work properly since you are expecting it to fit inside a parent rectangle with not enought space. A width of 1278 and 718 height is needed but you only got 1276px for width and 716px after taking in count the margins so the child rectangle won't work properly. Method2 Rectangle { id:mainRect width:1280 height:720 Rectangle { width: mainRect.width - 2 height:mainRect.height - 2 anchors: { top: parent.top topMargin: 2 left: parent.left leftMargin: 2 bottom: parent.bottom bottomMargin: 2 right: parent.right rightMargin: 2 } } } There are several ways to implement this type of objects but you need to keep in mind as @LeLev mentions the Concepts in Qt Quick - Positioning since every minor change can lead into an issue.
  • formatting list items for width

    Solved
    6
    0 Votes
    6 Posts
    423 Views
    mzimmersM
    Found the problem: the width formatting needed to be applied at the Button level, not at the Text level: Repeater { id: headerRow model: currentHeaders.length + extraCols_ Button { id: headerButton width: columnWidths[index] ...
  • dynamic number of models

    Solved
    7
    0 Votes
    7 Posts
    470 Views
    M
    @LeLev Great it works! I have edited and corrected Main.qml in previous post. Many Thanks Marek
  • Swipeview with variable number of pages depending on model size

    Unsolved
    1
    0 Votes
    1 Posts
    127 Views
    No one has replied
  • 0 Votes
    1 Posts
    249 Views
    No one has replied
  • Grow Qml Text uniformly from the center when animating font.pixelSize

    Unsolved
    2
    0 Votes
    2 Posts
    241 Views
    J.HilkJ
    @Andreas-Schacherbauer don't use x or y for positioning, use anchors.centerIn: parent, that should do the trick
  • Display image in qml using Image provider.

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    fcarneyF
    @Pooja-Bhusare said in Display image in qml using Image provider.: QQmlContext *context = new QQmlContext(engine.rootContext()); Why are you doing this? Don't do this. You don't need a separate context. Connections { target: imageprovider onNewFrameReceived: server_image.reload(); } imageprovider isn't a context property and doesn't need to be one. onNewFrameReceived isn't a signal of your image provider class. Why are you commenting this out?: server_image.source="image://imageprovider/cover" QImage QmlImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize) { return server_image; } I going to return the same image regardless of your image://imageprovider/<value>. Use "id" to differentiate. This is fine if this is what you want. I don't know the networking side very well. I have used image providers a lot. You might need to do this when your image updates. I am not sure if the image provider will signal a change in the image. server_image.source="" server_image.source="image://imageprovider/cover" This will force the update the image if it changed. I have had to do this.