Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Border-Radius is not working with QProgressBar when value is 0.

    Solved
    4
    0 Votes
    4 Posts
    430 Views
    I
    bm = QBitmap(self.min10.size()) bm.fill(Qt.color0) p = QPainter(bm) p.setRenderHint(QPainter.HighQualityAntialiasing) p.setPen(Qt.color1) p.setBrush(Qt.color1) radius = 21 p.drawRoundedRect(QRect(0,0,bm.width(),bm.height()),radius,radius) p.end() self.min10.setMask(bm) Thanks to a bug report from a decade ago Here is the result [image: 22473568-34cd-4f1e-bb8b-4d8dd3305e9b.png]
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • property name <<speed>> invalid. (M16)

    Unsolved
    4
    0 Votes
    4 Posts
    278 Views
    MarkkyboyM
    Presumably, your 'Speed.qml' is in another directory, I don't see any import statement heading your file.
  • One Models for two View

    Unsolved
    2
    0 Votes
    2 Posts
    204 Views
    SGaistS
    Hi, If you have all the information you need within on model, there's no reason to split it especially if you have a single input such as a serial port. You should be able to configure your views to show exactly what you want from the model. Worst case, you can put proxy models between but it does not look like you would need that in your case.
  • 0 Votes
    1 Posts
    100 Views
    No one has replied
  • QML MediaPlayer stopped playing local Audio in Qt 6.6

    Unsolved
    4
    0 Votes
    4 Posts
    356 Views
    SGaistS
    There are still plugins, the way they are managed has changed. Currently the native and ffmpeg with default being ffmpeg since 6.5.
  • Displaying a Large PDF without Freezing the UI Thread

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

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Rotate the Application Window using QML

    Unsolved qml quick virtualkeyboard
    2
    0 Votes
    2 Posts
    579 Views
    MarkkyboyM
    A total guess; Screen QML contains 'orientation' and 'primaryOrientation'. https://doc.qt.io/qt-5/qml-qtquick-window-screen.html#orientation-attached-prop I'm using Qt5.15, so can't offer any real insight. I assume the monitor you are using is able to /does contain an accelerometer and should be able to rotate either dynamically or by code.
  • Flickable.clip interferes with margin setting

    Solved
    3
    0 Votes
    3 Posts
    327 Views
    mzimmersM
    Good suggestion. I actually kept the padding, but used a negative margin for those items I wanted to have ignore the padding -- same result. Thanks...
  • FileDialog in QML 6.5

    Unsolved
    2
    0 Votes
    2 Posts
    615 Views
    DiackneD
    Hi try this: options : FileDialog.DontUseNativeDialog https://doc.qt.io/qt-6/qml-qtquick-dialogs-filedialog.html#options-prop
  • qtdeclarative 6.7+ with QML and dynamic linking wrt. license implications

    Unsolved
    5
    0 Votes
    5 Posts
    878 Views
    C
    @SimonSchroeder : First of all: I am for sure also not a lawyer. Just a simple developer. The file used, src/qml/qqmlbuiltins_p.h, declares multi licenses: // Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only So I am a bit unsure of what the resulting license of the static library is. What I was hoping for, is what @Ulf-Hermann is also doing and changing so the library is not static, since it did not really make sense (in my opinion). I am puzzled to why noone else have been looking into their generated makefiles and wondered why a static linking was suddenly done. As far as I can tell, it should happen as soon as the application uses QML hence happen for quite alot of people. I geuss few people actually look in the generated Makefiles.. @Ulf-Hermann : I did test removing the builtins from the Makefile and building my code. Removing the builtins, makes the code compile, and seemingly work (did not do a complete test of all the features in the application). That can of cause be done, but it seems wrong to: run qmake manually fixup the generated Makefile run make
  • Combined emoji's are not properly rendered on Android

    Unsolved
    3
    0 Votes
    3 Posts
    548 Views
    M
    Thanks for your reply. That is what I kind of did in the end. I scan the text to detect the troublesome emoji's and surround the emoji-sequence with "<font family="Noto Color Emoji">...</font>" This works. but it is CPU intensive. I am doing this in a social media app. For every post I now do this, but it's a waste of cycles. Also it gives other problems, as I now have to set the textFormat to RichText things like eliding do not work anymore.
  • This topic is deleted!

    Solved
    3
    0 Votes
    3 Posts
    204 Views
  • 0 Votes
    3 Posts
    521 Views
    C
    Thanks for your reply. One thing to note is that if I hadn't turned on the virtual keyboard on MacOS, this Dialog destruction wouldn't have caused the program to crash.
  • 1 Votes
    1 Posts
    152 Views
    No one has replied
  • FileDialog set preset file name

    Unsolved
    2
    0 Votes
    2 Posts
    237 Views
    DiackneD
    Hi, i think your problem is in the currentFile: you need to set all path and need to be valid more the new file name like QLP.FileDialog { id: fileDialogSaveFile title: qsTr("Select file") nameFilters: [ "JSON files (*.json)" ] currentFile: StandardPaths.writableLocation(StandardPaths.DownloadLocation) + "/" + 1234 folder: StandardPaths.writableLocation( StandardPaths.DownloadLocation) fileMode: QLP.FileDialog.SaveFile
  • Unable to wrap text in TextEdit when its font.pixelSize or font.pointSize exceeds 250.

    Unsolved
    2
    0 Votes
    2 Posts
    194 Views
    DiackneD
    Hi, i think the problem is the wrap can't more wrap the word because de char is bigger than flick width, you may need limited max zoomFontSize to char width < flick.width
  • How handle the pasted file from clipboard

    Unsolved
    2
    0 Votes
    2 Posts
    601 Views
    DiackneD
    Hi, please, can you explain better your problem... if I understood you can do some like this : Rectangle { color: "blue" width: 100 height: 100 DropArea { anchors.fill: parent onDropped: { console.log("Something was Dropped"); console.log(clipboard.getText()) } } } the clipboard you need to pass from C++ to qml you have examples here : https://stackoverflow.com/questions/40092352/passing-qclipboard-to-qml check this documentation QClipboard https://doc.qt.io/qt-6/qclipboard.html for more information about mechanism to copy and paste data between applications https://doc.qt.io/qt-6/qguiapplication.html#clipboard
  • Qt 5.15.2 item disappear when used in StackView

    Solved
    9
    0 Votes
    9 Posts
    564 Views
    F
    Thank you all guys! I implemented @GrecKo solution and now it's working! The BottomBar.qml file now look like this import QtQuick 2.9 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 Rectangle { property bool leftButtonVisible: false property bool centralButtonVisible: false property bool rightButtonVisible: false property alias rightButtonText: rightButton.text signal leftButtonClicked() signal centralButtonClicked() signal rightButtonClicked() id: bottomBar color: "#fafafa" visible: leftButtonVisible || centralButtonVisible || rightButtonVisible Row { anchors.fill: parent spacing: width * 0.02 Item { height: parent.height width: parent.width * 0.32 Button { id: leftButton anchors.fill: parent visible: bottomBar.leftButtonVisible onClicked: bottomBar.leftButtonClicked() } } Item { height: parent.height width: parent.width * 0.32 Button { id: centralButton anchors.fill: parent visible: bottomBar.centralButtonVisible onClicked: bottomBar.centralButtonClicked() } } Item { height: parent.height width: parent.width * 0.32 Button { id: rightButton anchors.fill: parent visible: bottomBar.rightButtonVisible onClicked: bottomBar.rightButtonClicked() } } } }