Skip to content
  • 144k Topics
    722k Posts
    I am trying to use a QTextEdit with QGraphicsDropShadowEffect, but the caret is being overlapped by the shadow, maybe am I missing something? I am using: Windows 11 24H2 26100.4349 Qt Creator 17.0.0 Qt 6.9.1 Qt and Qt Creator installed via Qt Online Installer [image: 023011bb-f185-4e4a-bf2d-40097910826f.gif] #include <QApplication> #include <QWidget> #include <QTextEdit> #include <QVBoxLayout> #include <QHBoxLayout> #include <QPalette> #include <QGraphicsEffect> #include <QCheckBox> int main(int argc, char *argv[]) { QApplication app(argc, argv); // ----- Main window ------------------------------------------------------ QWidget mainWindow; mainWindow.setFixedSize(300, 300); mainWindow.setWindowTitle("QTextEdit caret bug"); QPalette pal = mainWindow.palette(); pal.setColor(QPalette::Window, Qt::white); mainWindow.setAutoFillBackground(true); mainWindow.setPalette(pal); // ----- QTextEdit -------------------------------------------------------- QTextEdit *textEdit = new QTextEdit; textEdit->setFixedSize(200, 200); textEdit->setText("Dark‑yellow bold 20 px text on transparent background"); textEdit->setFrameStyle(QFrame::NoFrame); textEdit->setStyleSheet( "QTextEdit {" "background: transparent;" "color: #B8860B;" "font-weight: bold;" "font-size: 20px;" "}" ); // ----- Drop shadow effect ----------------------------------------------- auto *shadowEffect = new QGraphicsDropShadowEffect(&mainWindow); shadowEffect->setBlurRadius(10.0); shadowEffect->setOffset(3, 3); shadowEffect->setColor(QColor(0, 0, 0, 128)); textEdit->setGraphicsEffect(shadowEffect); // ----- Checkbox to toggle shadow ---------------------------------------- auto *shadowCheckBox = new QCheckBox("Enable drop shadow"); shadowCheckBox->setStyleSheet("QCheckBox { color: black; }"); shadowCheckBox->setChecked(true); QObject::connect(shadowCheckBox, &QCheckBox::toggled, shadowEffect, &QGraphicsEffect::setEnabled); // ----- Layout ----------------------------------------------------------- auto *vLayout = new QVBoxLayout(&mainWindow); vLayout->addStretch(); auto *hText = new QHBoxLayout; hText->addStretch(); hText->addWidget(textEdit); hText->addStretch(); vLayout->addLayout(hText); auto *hCheck = new QHBoxLayout; hCheck->addStretch(); hCheck->addWidget(shadowCheckBox); hCheck->addStretch(); vLayout->addLayout(hCheck); vLayout->addStretch(); mainWindow.show(); return app.exec(); }
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k 5 days ago
    4k Topics
    23k Posts
    @raulgd It helps to identify the purpose and composition of each channel. This forum is a community forum for Qt users to help each other to use the existing Qt API. Questions are mainly answered by community volunteers in their spare time. The Development mailing list (https://lists.qt-project.org/listinfo/development) is where stakeholders discuss the details of implementing new features in the Qt framework itself (such as Apple Liquid Glass styling). The Support Center (https://account.qt.io/s/support-center) is where commercial license holders can talk to support engineers whose job is to provide technical support for Qt Company customers. getting replies from someone from Qt @jsulm is a community member who is unaffiliated with the Qt Company. Anyway, as for your original question, please see https://forum.qt.io/topic/162394/qt-and-apple-glass-ui-in-macos-26/9 (Tor Arne is an engineer from the Qt Company)
  • Everything related to designing and design tools

    127 382 16 days ago
    127 Topics
    382 Posts
    I see this is an old thread and I see several unresolved threads on this topic. I'm leaving this incase it helps someone else who ends up here. The solution was twofold for me. Go to File > Export Project and select Enable Python Generator. This will create a main.py. Make sure you pip install PySide6-DS Hope this helps someone.
  • Everything related to the QA Tools

    76 212 17 days ago
    76 Topics
    212 Posts
    Hello, we're using the squish teamcity plugin and were wondering whether it was possible to configure the test report a bit more to our liking. We'd like the JUnit XML report and disable the other reports. It seems that in the TC build step it isn't possible to add/override the --reportgen option: [image: 8219c95e-dd8d-4dd6-93e9-72024cd65943.png] What are our options? Cheers, Adam
  • Everything related to learning Qt.

    379 2k 20 days ago
    379 Topics
    2k Posts
    I can't edit my previous message now but I finally managed to run the program. It seems that the file path was too long, and by renaming my project to "Challenge1" (it was previously called "QML-for-Beginners-Challenges-Intro-to-QML"), it worked.
  • 2k Topics
    13k Posts
    Hi, I think you went the too complicated road: quint16 calculateCrc16Arc(const QByteArray &data) { quint16 crc = 0x0000; const quint16 poly = 0xA001; for (char byte : data) { crc ^= (static_cast<quint8>(byte)); for (int i = 0; i < 8; i++) { crc = (crc & 0x0001) > 0 ? (crc >> 1) ^ poly : (crc >> 1); } } return crc; }
  • 4k Topics
    18k Posts
    Excellent ! Merci pour le pointeur La gestion des écrans n'est jamais chose aisée. Spécialement depuis l'avènement des DPis de hautes valeurs.
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k 17 days ago
    1k Topics
    10k Posts
    @RokeJulianLockhart to the best of my knowledge, no. The first release of Discourse was in 2014 and the forum is several years older than that.