跳到內容

QML and Qt Quick

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

    Unsolved
    8
    0 評價
    8 貼文
    746 瀏覽
    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 評價
    3 貼文
    762 瀏覽
    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 評價
    2 貼文
    640 瀏覽
    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 評價
    15 貼文
    2k 瀏覽
    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 評價
    1 貼文
    294 瀏覽
    尚無回覆
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    8 瀏覽
    尚無回覆
  • How to display a QPixmap/QImage in QML?

    Solved
    15
    0 評價
    15 貼文
    25k 瀏覽
    J
    Thank a lot for your code example. Really appreciate.
  • Load image from disk

    Solved
    2
    0 評價
    2 貼文
    469 瀏覽
    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 評價
    3 貼文
    556 瀏覽
    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 評價
    1 貼文
    609 瀏覽
    尚無回覆
  • How to stop the tab order to be propagated through SwipeView pages?

    Unsolved tab key tab switching tab order swipeview
    1
    0 評價
    1 貼文
    327 瀏覽
    尚無回覆
  • setting arguments in reused QML file

    Solved
    6
    0 評價
    6 貼文
    503 瀏覽
    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
  • Not enough stack space available for QML. Please increase the process stack size to more than 256 KBytes.

    Unsolved
    2
    0 評價
    2 貼文
    223 瀏覽
    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 評價
    3 貼文
    783 瀏覽
    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 評價
    6 貼文
    423 瀏覽
    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 評價
    7 貼文
    469 瀏覽
    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 評價
    1 貼文
    127 瀏覽
    尚無回覆
  • 0 評價
    1 貼文
    249 瀏覽
    尚無回覆
  • Grow Qml Text uniformly from the center when animating font.pixelSize

    Unsolved
    2
    0 評價
    2 貼文
    241 瀏覽
    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 評價
    7 貼文
    2k 瀏覽
    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.