Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • QT Quick PY, move framelless window by dragging ?

    Unsolved
    1
    0 Votes
    1 Posts
    116 Views
    No one has replied
  • [qtcharts iOs error : unknown method return type: QAbstractAxis*]

    Solved
    2
    0 Votes
    2 Posts
    268 Views
    S
    As I mentioned post, qtcharts iOs error : unknown method return type: QAbstractAxis*, there's a makeshift. This works fine when I build it in release settings instead of debug settings. This problem is not really solved but I'll close this thread for now. If anyone have proper solution for this, please leave more opinion for this thread.
  • Ask a noob question, how is the url written?

    Moved Solved
    7
    0 Votes
    7 Posts
    431 Views
    JoeCFDJ
    wav file can be played back in Windows Media Player if the appropriate codecs are installed on the computer. The most common audio codecs that are used in . wav files include Microsoft Adaptive Differential Pulse Code Modulation (MS ADPCM) and uncompressed Pulse Code Modulation (PCM).
  • QtObject created and returned by singleton, how to attached slots ?

    Solved
    2
    0 Votes
    2 Posts
    188 Views
    SPlattenS
    Solved: Connections { target: instance function onDataChanged(dblData_) { rText.text = root.getValue(dblData_, true) } }
  • z-index of LineSeries

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    L
    Hi ,did you get the solution for setting z index for lineseries ? am looking for the same help
  • Ongoing problem, trying to create manager in singleton...

    Solved
    7
    0 Votes
    7 Posts
    340 Views
    J.HilkJ
    @SPlatten via a custom property ? that you tell the manger
  • QML How to sort a tableView just by clicking on the header of the column

    Unsolved
    4
    0 Votes
    4 Posts
    3k Views
    Dmytro KD
    This is really good! Thank you!
  • QML Module Not Found QtQuick.Window

    Unsolved
    13
    0 Votes
    13 Posts
    7k Views
    JoeCFDJ
    @MH24 Qt 6.2.4 is too new for Qt6. Try Qt6.4 or above. if you use Qt6, drop the version numbers in the rows of import. import QtQuick import QtQuick.Window Window { width: 640 height: 480 visible: true title: qsTr("Hello World") }
  • Resize the widget with the mouse

    Solved
    4
    0 Votes
    4 Posts
    350 Views
    jsulmJ
    @Mihaill Ah, sorry once more I did not notice that the question was posted in QML forum and suggested a solution for QtWidgets :-)
  • QML Video onPositionChanged raises to rarely

    3
    0 Votes
    3 Posts
    1k Views
    S
    Video element has a property notifyInterval which determines how often the events should be trigerred. Default value is set to 1000 milliseconds. Refer: https://doc.qt.io/qt-5/qml-qtmultimedia-video.html#notifyInterval-prop Kudos
  • Defining a function in ListElement - Not working with append

    Unsolved
    3
    1 Votes
    3 Posts
    1k Views
    A
    In case someone is looking for this, my approach is the following: ListModel { id: buttons ListElement { title: "Test Button" onButtonClicked: function(value) { console.log("clicked", value) } } } ListView { id: buttonListView width: 100 height: 500 model: buttons delegate: Button { text: title width: buttonListView.width height: 50 onClicked: onButtonClicked(title) } } Important in this case is that onButtonClicked begins with function(value), only function() did not work for me.
  • Looking for an alternative to QmlMap

    Unsolved
    6
    0 Votes
    6 Posts
    439 Views
    oria66O
    @ChristianSky mmm unfortunately no that I know. Anyway, if anyone has some solution, please post it here.
  • QSortFilterProxyModel filterAcceptsRow being called unexpectedly

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    SGaistS
    Can you provide a minimal compilable example of your code ? That would help take a better look at your situation ?
  • properly setting size of Flickable for ScrollBar

    Solved
    3
    0 Votes
    3 Posts
    372 Views
    mzimmersM
    @Imynn that was it - I guess I'd been staring at it for so long, I'd overlooked the obvious. Thanks so much.
  • QML Menu right-to-left bug

    Unsolved
    1
    0 Votes
    1 Posts
    217 Views
    No one has replied
  • Detect OpenGL version before creating QApplication?

    Solved
    3
    0 Votes
    3 Posts
    789 Views
    fcarneyF
    @DerReisende said in Detect OpenGL version before creating QApplication?: glGetString This led me to this topic: https://forum.qt.io/topic/64503/qopenglfunctions-glgetstring-gl_extensions-is-null/16 I ended up creating the QApplication, a surface, and a context. Then I check the version. Then I delete the app and the surface and force the attribute to use ANGLE if the opengl version is too low (<2.1). Then I recreate the QApplication.
  • Help with non-existent QML property

    Solved
    4
    0 Votes
    4 Posts
    321 Views
    sierdzioS
    The first snippet you show looks like QML code (is the file named DataMngr.qml?), but then you register DataMngr as if it was a C++ class. My guess is that you have a name duplication here and QML engine is confused what to pick.
  • Build Qt6 and PySide6 from source for embedded device

    Unsolved
    1
    0 Votes
    1 Posts
    212 Views
    No one has replied
  • specifying Button:onClicked via property

    Solved
    13
    0 Votes
    13 Posts
    4k Views
    johngodJ
    I know this is marked as solved but just wanted to add my 2 cents. I did this by adding a property int type and a signal with a argument in my button, then calling the mouse click handler would invoke the signal with the type argument. Then outside on your menu were you have all your buttons, each button click will call another menu signal that receives the button type. Then you just add a bunch of if else's or a switch case to handle every type of button. Something like this: Pill.qml: Rectangle { id: pill property int type signal btnClick(btnSignal: int) MouseArea { anchors.fill: parent onClicked: btnClick(type) } } Then on your menu: signal handlePills(type: int) onHandlePills: function(type){ if (type === stuff1) doStuff1() if (type === stuff2) doStuff2() ....... } Pill { type: stuff1 onBtnClick: handlePills(type) } Pill { type: stuff2 onBtnClick: handlePills(type) } To make this more elegant you can create a qml enum and use it on type. I dont know your use case but to me was less error prone and more elegant code. Taking another step further, and since I needed a dynamic menu where I could add or remove buttons, I created a listview, a model and button delegate, to create the menu with buttons. Then only took me a line of code to add a button: function showMenuCommands() { menuCommands.modelMenu.clear() menuCommands.modelMenu.append({"textName": "copy", "typeName": Commands.Copy}) menuCommands.modelMenu.append({"textName": "move", "typeName": Commands.Move}) menuCommands.modelMenu.append({"textName": "scale", "typeName": Commands.Scale}) ........ }
  • OpenCV2 Qt Quick Python

    Unsolved
    3
    0 Votes
    3 Posts
    808 Views
    M
    @Minhtam said in OpenCV2 Qt Quick Python: self.cap = cv2.VideoCapture(0, apiPreference=cv2.CAP_ANY, params=[ cv2.CAP_PROP_FRAME_WIDTH, 1280, cv2.CAP_PROP_FRAME_HEIGHT, 720]) well, I just found a solution and then apply for little Jetson Nano but can not get it from pip. Then I try to build from source PySide6 but again "Qt for small business" cold again