跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • how in Qt Quick draw line ???

    Unsolved 3d canvas 2d graphics quick
    2
    0 評價
    2 貼文
    495 瀏覽
    jsulmJ
    @timob256 I entered "Qt Quick draw line" in Google and got this: https://doc.qt.io/qt-5/qml-qtquick-pathline.html
  • How to capture Hide key event in virtual Keypad

    Solved
    2
    0 評價
    2 貼文
    317 瀏覽
    P
    @Praveen-Illa This was solved in another forum. Please refer to below link for the solution https://stackoverflow.com/questions/69814505/how-to-capture-hide-key-event-in-qt-virtualkeyboard
  • Missing .dll Error Running QML/PySide/QtQuick stock application.

    Unsolved
    1
    0 評價
    1 貼文
    311 瀏覽
    尚無回覆
  • Qt Design Studio and Qt Creator Emulation Layer Fails Mac M1

    Unsolved design studio emulator qml
    1
    0 評價
    1 貼文
    311 瀏覽
    尚無回覆
  • How to save files from and to usb ?

    Solved
    12
    0 評價
    12 貼文
    2k 瀏覽
    JoeCFDJ
    @DiegOne said in How to save files from and to usb ?: QFileDialog::getExistingDirectory the usb path is here /media/username/ There may be more to be done: progress bar(hard to impossible to do on linux if file size is too big) stop in the middle of copying QFile::copy(srcPath, dstPath) is not optimized remind the user: do not remove usb in the middle of copy since usb can be damaged. it is better to add a button to let users remove usb safely.
  • Choose and change user settings in QML

    Unsolved
    1
    0 評價
    1 貼文
    167 瀏覽
    尚無回覆
  • To access QList<QPointF> property value in cpp side using qmetaProperty

    Unsolved
    3
    0 評價
    3 貼文
    522 瀏覽
    GrecKoG
    Are you sure it's emply and not just not displayed in qDebug? what about qDebug() << meta_property.read(obj).value<QList<QPointF>>();?
  • Customize qtChart

    Solved
    2
    0 評價
    2 貼文
    308 瀏覽
    S
    Ok I found it : [image: 9a97c36e-9a72-4f52-b810-3518ddbf585d.JPG] I call this function each time the QSliderRange change : void Controller::updateBackground(QQuickItem* item){ if(item){ if(QGraphicsScene *scene = item->findChild<QGraphicsScene *>()){ for(QGraphicsItem *it : scene->items()){ if(QtCharts::QChart *chart = dynamic_cast<QtCharts::QChart *>(it)){ // Customize plot area background QImage background(item->width(), item->height(), QImage::Format_ARGB32); if (background.isNull()) continue; background.fill(QColor(Qt::white)); QPainter painter(&background); int margin = (item->height()-chart->plotArea().height()) /2; int hRed = (10- _pData->threshHigh)/10 * chart->plotArea().height(); int hGreen = _pData->threshLow/10 * chart->plotArea().height(); int hYellow = chart->plotArea().height() - hRed - hGreen; // Red zone painter.fillRect(0, 0, item->width(), margin + hRed, QBrush(QColor(255,50,50,128))); // Yellow zone painter.fillRect(0,margin+hRed, item->width(), hYellow, QBrush(QColor(235,220,50,128))); // Green zone painter.fillRect(0,margin+hRed+hYellow, item->width(), margin+hGreen, QBrush(QColor(100,150,100,128))); chart->setPlotAreaBackgroundBrush(background); chart->setPlotAreaBackgroundVisible(true); } } } } } By passing the ChartView as parameter : sThresh.first.onValueChanged: controller.updateBackground(chart) sThresh.second.onValueChanged: controller.updateBackground(chart)
  • how in Qt Quick 3D to impose a mesh on an object or a primitive and change the shape ???

    Unsolved 3d model qml qt quick
    1
    0 評價
    1 貼文
    431 瀏覽
    尚無回覆
  • QT quick TreeView and TreeViewStyle

    Unsolved
    1
    0 評價
    1 貼文
    210 瀏覽
    尚無回覆
  • Compare Items of listview and aray

    Unsolved
    14
    0 評價
    14 貼文
    2k 瀏覽
    S
    @Psyduck0205 I too facing similar issue. I need to access list of qvariant from squish? Can you help me ?
  • Random Text

    Unsolved
    2
    0 評價
    2 貼文
    344 瀏覽
    SGaistS
    Hi, You can take a look at the fortune example for a way of generating random text.
  • Add client certificate to QQuickWebEngineProfile clientCertificateStore in QML

    Unsolved
    14
    0 評價
    14 貼文
    1k 瀏覽
    N
    ugh. I guess this feature has just been broken for over a year with misleading documentation. no big deal. thanks for your help everybody. https://bugreports.qt.io/browse/QTBUG-86132
  • Use a shader to hide part of an image

    Solved shadereffect
    2
    0 評價
    2 貼文
    452 瀏覽
    P
    Ok, I figured it out ! The shader does not change the Image, it just draws something else on the shader item's position. The solution was pretty darn simple: make the Image invisible and let the shadereffect item handle all the rendering part.
  • Qt shut down when I click Design mode

    Unsolved
    1
    0 評價
    1 貼文
    155 瀏覽
    尚無回覆
  • QList<customObj *> in QML not working on raspberry

    Unsolved
    4
    0 評價
    4 貼文
    332 瀏覽
    P
    Yes QList<QObject*> is working. But why QList<SENSOR*> work on my Desktop and not work on raspberry???
  • WebEngineView cannot run WebGL

    Solved
    5
    0 評價
    5 貼文
    2k 瀏覽
    raven-worxR
    @DiegOne hmm, still rather strange
  • Animation of PathView delegate

    Unsolved
    3
    0 評價
    3 貼文
    334 瀏覽
    M
    @fcarney I removed the Component but the error is the same: QML PropertyAnimation: Cannot animate non-existent property "y" But now the Item should have the y property, right?
  • Qt/QML 5.15.5 How to set logical DPI to 96

    Unsolved
    2
    0 評價
    2 貼文
    735 瀏覽
    V
    It would appear to be that there is an environment variable that will do this, not perfectly, but certainly vastly better than previously. Sadly, the very limited documentation on it implies it is only something for development purposes, presenting a clumsy way to look at your app using different DPI settings. The following, placed in main.cpp, worked. Yes, it could be set in the environment as well, having first tested it as a .profile entry. qputenv("QT_FONT_DPI", QByteArray("96")); 96 DPI is just a reference value on which Qt should be doing the appropriate scaling internally. It could be almost anything and still achieve the same results. Virtual pixels are obviously used for GUI components, why not consistently for the fonts. Though we are seeing what appears like a font substitution as well. Best guess is that Arial is being substituted for Liberation Sans, even though Liberation Sans is installed on all systems and is specifically loaded by the application. For example, the zero is much narrower on my system than on the target, as is the case of the zero in Arial as opposed to Liberation Sans.
  • How to set the the path of images in qml file if the qml file is in resource ?

    18
    0 評價
    18 貼文
    48k 瀏覽
    R
    This is really informative.