Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • QTableWidget

    Unsolved
    4
    0 Votes
    4 Posts
    691 Views
    M
    Well thanks @VRonin as it provided the solution that was unsolvable before. Here is a summary of my problem and how this solved it for the record. When using a dark stylesheet (dark.qss) the top-left corner button remains untargettable with styling. Calling findChild(QAbstractButton) and forcing a stylesheet in code helped for a moment, but the white square came back on resize, theme change, or first show. Root cause seemed to be Qt treats that corner button as part of the table header, not as a normal button. Header pieces are styled with the selector QHeaderView::section. The corner is a special header piece called QTableCornerButton::section. If you never tell Qt what colour that piece should be, it falls back to the system’s light colour even in dark mode which seems to be white. After hacking workarounds in the code and doing all sorts, I was still unable to resolve it permanently until approaching it treating the top-left select-all button as a header, not a button. Styling it with QTableWidget QTableCornerButton::section in my QSS and that was pretty much it. In my case adding this into my dark.qss theme file: /* Dark-theme top-left corner (select-all button) */ QTableWidget QTableCornerButton::section { background-color: #2b2b2b; /* same as table background */ border: 1px solid #555555; /* same as table border */ border-bottom: 2px solid #777777; /* optional – matches header underline */ } also adding into the python script: app.setStyle("Fusion") and loading the stylesheet after the style is set. a simple example as a test was: import sys from PySide6.QtWidgets import QApplication, QTableWidget from pathlib import Path app = QApplication(sys.argv) app.setStyle("Fusion") # ---- dark.qss (only the relevant part) ---- qss = """ QTableWidget { background-color: #2b2b2b; color: #e0e0e0; } QHeaderView::section { background-color: #2b2b2b; color: #e0e0e0; border: 1px solid #555555; } QTableWidget QTableCornerButton::section { background-color: #2b2b2b; border: 1px solid #555555; border-bottom: 2px solid #777777; } """ app.setStyleSheet(qss) w = QTableWidget(5, 3) w.show() app.exec() I hope that helps anyone running into this problem which clearly still exists in 2025 and until I found the info in the link shared by Vronin I was struggling to solve.
  • How to use qt_generate_deploy_qml_app_script?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    L
    For me it was because when I switched to a 6.8 kit, the "deployment configuration" quietly got set to "Automatic Application Manager Deploy Configuration". As far as I know, I have no need for Application Manager (and evidently, like you, don't even have it installed). I also don't know why it happened for this project and not another, but perhaps because this one is a QtQuick application? I just changed the configuration back to "Deploy Configuration" (which has No Deploy Steps) and all is well. You can find these settings by clicking on "Projects" in the left hand button pane in the Qt Creator window. [image: e47f7762-eb4c-434e-b793-8405a5fbc3d6.png]
  • How to register application to handle custom uri:// scheme?

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    G
    Thank you, @JKSH. That's great there's a facility in cmake for this on some platforms.
  • Git is down

    Unsolved
    8
    0 Votes
    8 Posts
    651 Views
    M
    @cristian-adam Thanks for the attempt for a workaround. I'm using 'init-repository' ; so not sure how to implement that trick + code.qt.io links are hard coded in QT src files, thus I've poor expectations :( Thanks !
  • 3D Textures support on all backends?

    Solved
    4
    1 Votes
    4 Posts
    138 Views
    febiodeveloperF
    Sorry took me a while to get back to this. I found the error and it turns out I did not use consistent uniform bindings between my vertex and fragment shader, you know, one of those ID-10-T errors :). Interestingly, OpenGL didn't seem to care and worked fine regardless. Anyways, the volume rendering is now working on all backends.
  • Dark color scheme on Windows best practises

    Unsolved
    5
    0 Votes
    5 Posts
    624 Views
    M
    @SimonSchroeder said in Dark color scheme on Windows best practises: As of Oktober this year almost nobody should be using Windows 10 anymore (though many will). Official support is ending by then and you'll be vulnerable to attacks. A few people might opt-in to extended support for a couple more months. I would say it's more than a few people who will be getting the Extended Security Updates for the next 11 months, and, after that, there still remain long term supported Enterprise versions of Windows 10, with support through January 2027 and 2032. There are definitely going to be lots of people trying to find ways to not make unnecessary e-waste out of their otherwise still functioning hardware.
  • QJsonObject::value causing segfault

    Unsolved
    12
    0 Votes
    12 Posts
    272 Views
    T
    @Axel-Spoerl I can try later after rewriting some of the code to compile on Qt 6.
  • Uuidv7 NULL character

    Unsolved
    3
    0 Votes
    3 Posts
    132 Views
    piervalliP
    Thanks, for comments
  • Qt SDI app?

    Solved
    4
    0 Votes
    4 Posts
    126 Views
    F
    Excellent! I will start to try what you sent me! Thank you all!
  • How is QClipboard::mimeData's returned pointer "invalidated"?

    Unsolved
    2
    1 Votes
    2 Posts
    75 Views
    JonBJ
    @rmccampbell Good question, worrying, and I don't know the answer. The only thread I could come across confirms it is not thread-safe but I'm not sure it answers your question or the implications. However it is worth reading through: Is it safe to use QClipboard in a background thread
  • Open a QDialog in QStyledItemDelegate

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    Q
    Hello again, it took a while to fix this behave. Just to let you know I added the command to the dialog on calling setEditorData setFocusProxy(ui->editLine ); hope this helps also someone of you.
  • QJsonObject::insert use fixed instead of scientific notation when inserting double

    Solved
    3
    0 Votes
    3 Posts
    95 Views
    JonBJ
    @Dadde As @Christian-Ehrlicher says. To be clear, you cannot influence how the JSON output is written (nor how it is read) in the JSON producers/consumers I know. They only may allow you to influence the irrelevant spacing/indentation/newlines output format, like enum QJsonDocument::JsonFormat.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • After using toStdString, the string exhibited abnormal behavior.

    Solved
    5
    0 Votes
    5 Posts
    211 Views
    JonBJ
    @John-Van said in After using toStdString, the string exhibited abnormal behavior.: @Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15? @Christian-Ehrlicher is suggesting you are mixing debug and release libraries. Check your compile/link commands carefully, particularly how you are compiling your code versus which libraries you are using/how they were compiled. We have often found that people are inadvertently e.g. compiling for debug but linking with release libraries or vice versa, which is not allowed and leads to unexpected behaviour. Also if you have a Windows problem please state what compiler you are using --- MSVC or MinGW, we cannot guess. You now have responses indicating it works correctly with each of them.
  • Unknown module(s) in QT: webenginewidgets

    Unsolved
    33
    1 Votes
    33 Posts
    3k Views
    enjoysmathE
    @Bonnie Apparently it only works for 6.10 for me. Followed the same procedure for each version.
  • Qt6 on Rasspery Pi lost package?

    Unsolved
    5
    0 Votes
    5 Posts
    177 Views
    MucipM
    Hi, I guess all the problems comes from Trixe? I think I need to go back to Bookwarm. Regards, Mucip:)
  • Qt6 linguist cannot respond to any input

    Unsolved
    3
    0 Votes
    3 Posts
    107 Views
    SGaistS
    Hi, Which version of lupdate/linguist are you using ? On which Linux distribution ? Did you check the logs of linguist to see if there's anything there ?
  • Hard to find some docs for QtGraphs in C++

    Solved
    3
    0 Votes
    3 Posts
    146 Views
    JKSHJ
    @jronald said in Hard to find some docs for QtGraphs in C++: For the code above, I can't find the keys (like seriesList, axisX, axisY) Those look like properties from GraphsView: https://doc.qt.io/qt-6/qml-qtgraphs-graphsview.html
  • QProgressBar has rendering errors or does not render at all

    Unsolved c++ qt6
    17
    0 Votes
    17 Posts
    1k Views
    Christian EhrlicherC
    There is no race condition but you use QGraphicsDropShadowEffect for a child widget with a radius of 10 so this widget is responsible for drawing everything of it's size + 10 pixel which overlaps with your progressbar. I don't understand why you use QGraphicsDropShadowEffect with this large radius at all. What do you want to achieve for a plain QWidget not in a QGraphicsScene?