Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Resizing QML QuickWindow black sides?!

    Unsolved qml qtquick window size
    12
    0 Votes
    12 Posts
    2k Views
    S
    Would i be viable to use qt widgets and just use qtquick for all the other widgets embedded into the qt widgets mainwindow or is this a bad idea?
  • VideoWidget

    Unsolved
    3
    0 Votes
    3 Posts
    254 Views
    V
    As I said in my original post, I have crossed FHD recording, the issue is with 4K... I want to understand whether QT/QML has the capability to support this...
  • Allocating an object of abstract class type

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    SGaistS
    Great ! Then please mark the thread as solved so other forum users may know a solution has been found :-)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Canvas - keeping curved text centered

    Solved
    2
    0 Votes
    2 Posts
    305 Views
    MarkkyboyM
    This is how it is done, with the help of ChatGPT!; Canvas { id: canvas width: 400 height: 400 rotation: 180 anchors.centerIn: parent onPaint: { var ctx = getContext("2d"); ctx.clearRect(0, 0, width, height); / / Get the name of today var today = new Date(); var dayName = Qt.formatDate(today, "dddd").toUpperCase(); //var dayName = "wednesday".toUpperCase(); // Arc parameters var centerX = width / 2; var centerY = height / 2; var radius = 430; var totalArcLength = Math.PI * 0.24; // The length of the arc (3/4th of a circle) // Calculate dynamic letter spacing based on available arc length and number of letters var letterSpacing = totalArcLength / (dayName.length - 1); var startAngle = (Math.PI - totalArcLength) / 2; // Center the text on the arc ctx.font = "44px Mono Bold"; ctx.textAlign = "center"; ctx.textBaseline = "middle"; for (var i = 0; i < dayName.length; i++) { var angle = startAngle + i * letterSpacing; var x = centerX + radius * Math.cos(angle); var y = centerY + radius * Math.sin(angle); ctx.save(); ctx.translate(x, y); ctx.rotate(angle + Math.PI / 2); // Rotate the context to align the text along the arc ctx.fillText(dayName[i], 0, 0); ctx.restore(); } } Component.onCompleted: canvas.requestPaint() } }
  • Issue with Custom Component in Qt Creator (Works in Qt Design Studio)

    Unsolved
    1
    0 Votes
    1 Posts
    165 Views
    No one has replied
  • Unknown component

    Unsolved
    4
    0 Votes
    4 Posts
    356 Views
    JKSHJ
    @ceydasimsekk said in Unknown component: I think I made the necessary definitions. Where did you make the necessary definitions? Is this an edit-time error, build-time error, or runtime error? (It could be one or more of these) Also, what version of Qt are you using? And what's your build system -- CMake, qmake, or Qbs?
  • SwipeView: when scrolling multiple indices away, don't show intermediates

    Unsolved
    1
    0 Votes
    1 Posts
    105 Views
    No one has replied
  • Qml Interface Property

    3
    0 Votes
    3 Posts
    1k Views
    GrecKoG
    You have to use the Q_DECLARE_INTERFACE and Q_INTERFACES macros
  • ListView scrolls down when prepending items

    Unsolved
    1
    0 Votes
    1 Posts
    118 Views
    No one has replied
  • Qt does not see the icon

    Solved
    6
    0 Votes
    6 Posts
    415 Views
    JKSHJ
    @ceydasimsekk said in Qt does not see the icon: @JKSH I understand, thank you very much. I'm new to Qt. You're most welcome. And great choice! 😄
  • Flick ListView with mouse wheel

    Solved
    3
    0 Votes
    3 Posts
    530 Views
    C
    awsome bro !!!! it`s usefull for srcoll horizental listview by mouse wheel ListView { id: root clip: true model: [1,1,1,1,1,1,1,1,1,1,1] orientation: ListView.Horizontal spacing: 10 ScrollBar.horizontal: ScrollBar {} MouseArea { property int speed: 5 anchors.fill: parent onWheel: (event) => { let scroll_flick = event.angleDelta.y * speed; if(root.horizontalOvershoot !== 0.0 || (scroll_flick>0 && (root.horizontalVelocity <=0)) || (scroll_flick<0 && (root.horizontalVelocity >=0))) { root.flick((scroll_flick - root.horizontalVelocity), 0); return; } else { root.cancelFlick(); return; } } } }
  • Custom Quick Controls Style not found

    Unsolved
    2
    0 Votes
    2 Posts
    265 Views
    M
    Welp, even though I think the docs says that the directory containing the current file is automatically part of the import path, it doesn't seem to be the case. If I do this, it works: QML_IMPORT_PATH=. qml -style MyStyle test.qml
  • Problem invoking method: No such method

    Unsolved
    4
    0 Votes
    4 Posts
    364 Views
    SGaistS
    Can you provide a minimal compilable example that shows this issue. That way it will be easier to help you find the issue.
  • Flip VideoOutput left to right or upside down

    Solved
    4
    0 Votes
    4 Posts
    717 Views
    Esmaeil_SooanE
    @GrecKo Hi no, I think it`s important property that must be add to VideoOutput module. any way : simple solution is what @diego-qt said but there is another solutions like ShaderEffect and QAbstractVideoSurface.
  • Issues with Retrieving Coordinates in Frameless Qt Window

    Unsolved window coordinate qml
    1
    0 Votes
    1 Posts
    218 Views
    No one has replied
  • module "QtCharts" is not installed

    Unsolved
    4
    0 Votes
    4 Posts
    431 Views
    SGaistS
    Why is that ?
  • Qml's strange blocks on windows11

    Unsolved
    3
    0 Votes
    3 Posts
    594 Views
    G
    I also faced this problem, try using "layer.enabled: true" for your main QML element. It was also effective to use “QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);” in C++, but for me personally this was not acceptable, because the project used other rendering methods.
  • integration of QML with Visual Studio 2002

    Unsolved
    3
    0 Votes
    3 Posts
    377 Views
    L
    @Christian-Ehrlicher I'm sorry I didn't make it clear. I mean integrated into projects that use VS2002. If not, what about VS2012 or other higher version?
  • Splitview weird behavior

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    B
    Hi @Imynn , I just faced the same problem and was able to solve it the following way. The problem is that from the documentation there is always 1 element in a SplitView that fills the width (height for vertical). And by default it is the last one. By regulating that element depending on the window width you can choose which one changes width along with the window. So I set red.fillWidth to false and blue.fillWidth to true when the window width is less than the threshold. I even did smth like splitview.onResizingChanged: if (!resizing) userBlueWidth = blue.width; // saving the blue width on the splitter drag release fillerRectIndex: Window.width < userBlueWidth + splitter.width + red.minWidth ? blueIndex : redIndex Red { SplitView.fillWidth: fillRectIndex == redIndex } Blue { SplitView.fillWidth: fillRectIndex == blueIndex } Then the blue becomes the filler and starts shrinking. Good luck!