Skip to content
  • Qt creator help theme

    Unsolved Qt Creator and other tools themes qt creator help doxygen
    2
    0 Votes
    2 Posts
    202 Views
    Christian EhrlicherC
    Qt is not using doxygen but QDoc: https://doc.qt.io/qt-6/qdoc-index.html
  • 0 Votes
    2 Posts
    339 Views
    C
    I have the exact same issue. Were you able to fix it?
  • A problem about parent widget and mouse event capture

    Unsolved General and Desktop help qt5.12.x
    1
    0 Votes
    1 Posts
    133 Views
    No one has replied
  • 0 Votes
    2 Posts
    301 Views
    jsulmJ
    @IGaming73 See https://doc.qt.io/qt-6/qsyntaxhighlighter.html and https://doc.qt.io/qt-6/qtwidgets-richtext-syntaxhighlighter-example.html
  • 0 Votes
    19 Posts
    2k Views
    S
    @Chris-Kawa thank you very much. That definitely helped a lot. :) I have done the manual positioning now, so all delegates line up with the actual widget. :) void ViewLayerItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyleOptionViewItem opt = option; initStyleOption(&opt, index); // Überprüfen Sie, ob der aktuelle Index bearbeitet wird if (index == currentlyEditedIndex) { return; } // Setzen Sie die Werte der SpinBox und CheckBox basierend auf den Modellwerten QString lineEditvalue = index.model()->data(index, Qt::EditRole).toString(); bool checkBoxValue = index.model()->data(index, Qt::CheckStateRole).toBool(); // Laden Sie das Icon und skalieren Sie es QPixmap iconPixmap("://resource/quick.png"); // Ersetzen Sie dies durch den Pfad zu Ihrer Icon-Datei QPixmap scaledPixmap = iconPixmap.scaled(32, 32, Qt::KeepAspectRatio, Qt::SmoothTransformation); // Berechnen Sie die Position für das Icon int centerY = option.rect.top() + option.rect.height() / 2; int iconY = centerY - scaledPixmap.height() / 2; QPoint iconPos = QPoint(option.rect.left() + 10, iconY); // Zeichnen Sie das Pixmap mit dem QPainter painter->drawPixmap(iconPos, scaledPixmap); // Berechnen Sie die Position und Größe für das LineEdit QRect lineEditRect = option.rect; lineEditRect.setLeft(iconPos.x() + scaledPixmap.width() + 10); // Adjust as needed lineEditRect.setRight(option.rect.right() - 10); // Adjust as needed // Erstellen Sie ein QStyleOptionFrame für das LineEdit QStyleOptionFrame lineEditOption; lineEditOption.lineWidth = 1; // Setzen Sie die Liniendicke auf 1 lineEditOption.rect = lineEditRect; // Zeichnen Sie das LineEdit QApplication::style()->drawControl(QStyle::CE_ShapedFrame, &lineEditOption, painter); // Zeichnen Sie den Text des LineEdits painter->drawText(lineEditOption.rect.adjusted(2,0,0,0), Qt::AlignLeft | Qt::AlignVCenter, lineEditvalue); // Berechnen Sie die Position und Größe für die CheckBox QRect checkBoxRect = option.rect; checkBoxRect.setLeft(lineEditRect.right() - 22); // Adjust as needed checkBoxRect.setRight(option.rect.right() - 10); // Adjust as needed // Erstellen Sie ein QStyleOptionButton für die CheckBox QStyleOptionButton checkBoxOption; checkBoxOption.state = checkBoxValue ? QStyle::State_On : QStyle::State_Off; checkBoxOption.rect = checkBoxRect; // Zeichnen Sie die CheckBox QApplication::style()->drawControl(QStyle::CE_CheckBox, &checkBoxOption, painter); }
  • 0 Votes
    5 Posts
    535 Views
    A
    @jsulm I got it now. Thank you!!
  • Display layout distorted then the actual layout.

    Solved General and Desktop qt6.5 beginner help
    5
    0 Votes
    5 Posts
    453 Views
    A
    @Christian-Ehrlicher I understood now. Thank you!!
  • 0 Votes
    12 Posts
    1k Views
    J
    @JonB That especific array allows me to read info coming from an arduino connected to my raspberry in where I'm doing all of this so the arduino sents me the dintance from a second sensor it is Just a number for example 11 or 113 or 5 is similar to What I'm trying to do with the ESP8266 but via wifi. The arduino part is always woking no matter how much time I have the gui running so I kinda figured out my mistake must be in the way I get the value from the hmtl page wich brings me to the QNetworkAccessManager.
  • Struggling to Import Module

    Unsolved QML and Qt Quick help module qtcreator import problem
    4
    0 Votes
    4 Posts
    890 Views
    B
    Apparently, there is a way. Quit and reboot Qt. However, now I'm having an issue with the next module in the tutorial series. This one's issue does not match the ones above. Hmm...
  • Reading numbers from a file

    Solved Qt Creator and other tools qtcreator 6.0.2 help qfile
    2
    0 Votes
    2 Posts
    476 Views
    M
    QFile file(file_name); file.open(QFile::ReadOnly); QVector<float> x,y; while(!file.atEnd()) { QList<QByteArray> list = file.readLine().split(' '); if(list.count()==2) { x<<list[0].toFloat(); y<<list[1].toFloat(); } } qDebug()<<x<<y;
  • Using a Qt GUI to upload a Arduino sketch

    Unsolved Mobile and Embedded arduino help gui uplaod
    2
    0 Votes
    2 Posts
    352 Views
    SGaistS
    Hi and welcome to devnet, From a quick look, it is done through a serial port so QSerialPort would make sense for that part. However for the protocol part, you will have to check the Arduino documentation.
  • 0 Votes
    1 Posts
    488 Views
    No one has replied
  • Qtquick\Qml Arc

    Unsolved QML and Qt Quick arc shape canvas beginner help
    4
    0 Votes
    4 Posts
    2k Views
    ndiasN
    Hi @fallouthase, Please find bellow a simple example using PathAngleArc: https://doc.qt.io/qt-6/qml-qtquick-pathanglearc.html import QtQuick.Shapes Shape { width: 200 height: 200 anchors.top: parent.top anchors.left: parent.left // Enable multisampled rendering layer.enabled: true layer.samples: 4 // Outer gray arc: ShapePath { fillColor: "transparent" strokeColor: "gray" strokeWidth: 20 capStyle: ShapePath.RoundCap PathAngleArc { centerX: 100; centerY: 100 radiusX: 100-20/2; radiusY: 100-20/2 startAngle: 135 sweepAngle: 270 } } // Inner blue arc: ShapePath { fillColor: "transparent" strokeColor: "blue" strokeWidth: 20 capStyle: ShapePath.RoundCap PathAngleArc { centerX: 100; centerY: 100 radiusX: 100-20/2; radiusY: 100-20/2 startAngle: 135 sweepAngle: 180 } } } [image: 512e5cf8-7b1e-4b4c-aa93-d98a1b78f9c0.png] You can also use already implemented customizable QML Circular Slider: https://github.com/arunpkqt/CircularSlider Best Regards
  • 0 Votes
    7 Posts
    960 Views
    BambusFanB
    @eyllanesc Thank you very much, you are right and it works now. I thought it was a function of prepare, so it would be identical.
  • 1 Votes
    18 Posts
    5k Views
    alexander.sageA
    @KroMignon being super sassy here as someone who is new to this is trying to understand the landscape. If the system you're deploying to and emulating are both arm, I don't think you would need the google intel x86 system image. that should be for a different type of device.
  • Sending data over internet

    Unsolved General and Desktop help internet qtcpserver qtcpsocket
    2
    0 Votes
    2 Posts
    554 Views
    JonBJ
    @BodyaGunko Hi and welcome. That's what running a web/HTTP server and exposing the IP over the Internet allows, from any client with a web browser.
  • QSSL Socket CANNOT Resolve, what to do?

    Unsolved Installation and Deployment openssl qssl help
    2
    0 Votes
    2 Posts
    420 Views
    SGaistS
    Hi, Qt 5.15 use OpenSSL 1.1. If you are locked to 1.0, you will need to rebuild qtbase with it.
  • 0 Votes
    2 Posts
    442 Views
    mrjjM
    Hi and welcome to the forums Why not export it directly to a video format ? Like mp4 etc ? ( from photoshop) ( and play that file in Qt) Also how big is the frames ? Would something like animated gif work ?