Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.3k Topics 456.0k Posts
  • 3 Votes
    29 Posts
    33k Views
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • Changing the taskbar icon

    Unsolved about 5 hours ago
    0 Votes
    2 Posts
    12 Views
    @TolleTafel Why the default python icon?! If you are running a Python script, it shows the icon of your python interpreter executable, if I'm not mistaken.
  • 0 Votes
    25 Posts
    130 Views
    @rparon said in uninitialized data passed to QStringList QCoreApplication::arguments(): const char* argv[] = {"MyDll"," "," "}; qapp_pt = cv_new QGuiApplication(argc, (char**) argv); This is always the wrong thing to do. This code is telling the compiler to allocate something as const, and then instructing it to ignore the const-ness when passing to a function that has a type signature allowing modification. Quoting from the above link: Such object cannot be modified: attempt to do so directly is a compile-time error, and attempt to do so indirectly (e.g., by modifying the const object through a reference or pointer to non-const type) results in undefined behavior. https://en.cppreference.com/w/cpp/language/ub.html undefined behavior - There are no restrictions on the behavior of the program. Some examples of undefined behavior are data races, memory accesses outside of array bounds, signed integer overflow, null pointer dereference, more than one modifications of the same scalar in an expression without any intermediate sequence point(until C++11)that is unsequenced(since C++11), access to an object through a pointer of a different type, etc. Furthermore, the QGuiApplication, the documentation explicitly mentions the possibility of modification: Note: argc and argv might be changed as Qt removes command line arguments that it recognizes.
  • Is it possible to get the x and y of a QSlider's handle?

    Unsolved about 7 hours ago
    0 Votes
    6 Posts
    28 Views
    @Kent-Dorfman I'm setting the style app.setStyle(QStyleFactory.create('windowsvista')) like this, and since I'm using a Windows only audio control library, I don't really care for other OS'es
  • This topic is deleted!

    Unsolved about 15 hours ago
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • 0 Votes
    35 Posts
    3k Views
    @JonB Thanks for the hint, but im in no hurry right now. :D Have a nice day.
  • 0 Votes
    2 Posts
    76 Views
    Hi and welcome to devnet, Something is not clear: are you creating a full custom widget ? It seems so but since Qt provides the base classes to create your own custom views within the model view set of classes, it would be good to clarify that first.
  • 1 Votes
    8 Posts
    243 Views
    So i finally found out what the problem was and fixed it... it seems i had given specific size settings to some component via a stylesheet, and some components did not have some/all properties defined in the stylesheet. Providing the correct info via the stylesheet appears to have resolved the situation. Eg. for the radio buttons i now have... QRadioButton::indicator { width: 14px; height: 14px; } in my style sheet, and it seems to properly respect the scaling when i have both types of scaling in use.
  • After using toStdString, the string exhibited abnormal behavior.

    Unsolved 2 days ago
    0 Votes
    4 Posts
    71 Views
    @JonB yeah, I've seen this before. If I'm reading this case correctly, the variable s2 is no longer needed by line 115, and has either been trashed or no longer properly maintained by the debugger.
  • insertPlainText valgrind error.

    Solved a day ago
    0 Votes
    17 Posts
    148 Views
    @JonB Definitely is, thanks again for the help Jon
  • QT 6.8 and FFmpeg 7.1

    Unsolved 3 days ago
    0 Votes
    2 Posts
    73 Views
    Hi and welcome to devnet, AFAIK, it literally means that the file path you passed points to something that does not exist. Did you check the path for correctness ? Where does it point to ? What kind of file is that ?
  • 0 Votes
    3 Posts
    63 Views
    Thanks for the reply! Yes, I agree this really seems to be a tvirt.vir issue, not Qt. That's why I wrote a standalone C program (outside Qt) to test the pipe communication. I’ve already tried: Sending the message DO#0#1 to \\.\pipe\\tubotest Triggering the EventoEnviar event after writing Still, nothing changes on the simulator side, and the input value shown in my DAQ console remains 0. I do have some documentation, and it says tvirt.vir listens for specific commands and events, but I’ll try to confirm exactly what sequence it expects. Thanks again. I’ll keep testing with the C version for now.
  • Problem testing with windows api

    Unsolved 3 days ago
    0 Votes
    10 Posts
    94 Views
    @JulsPower That does look more reasonable, i wasn't sure what the MS docs were telling you to do. Which implies you were in the Another possibility is that the issue has nothing to do with Qt or deployment but rather is a "bug" which only happens to show up in certain environments or circumstances. Such as a memory access issue. I had a quick glance at your WTSEnumerateSessionsExA() and it seemed OK to me, but you might want to try it standalone without any Qt stuff to make sure that works across environments. situation! The Qt and deployment changes simply showed or masked the problem. But you have still learnt what you should do to e.g. deploy to another machine, or be sure it works on yours outside of the Creator development environment which should be useful :)
  • How to switch off specific warnings in Qt Creator

    Unsolved 3 days ago
    0 Votes
    15 Posts
    125 Views
    @aha_1980 said in How to switch off specific warnings in Qt Creator: @DiBosco Have you already seen https://stackoverflow.com/questions/22129383/removing-unused-parameters-warning-in-qtcreator ? For your case, it would be: QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy Regards Ah, yes I had seen that. The English in the most upticked reply just made me go "What?". Just could not understand what they were saying, but I had tried: QMAKE_CXXFLAGS_WARN_ON += -Wdeprecated-copy Thinking why on earth would putting the warning on make it disappear, but out of desperation I gave it a go. Had I realised it needed -Wno-deprecated-copy, not -Wdeprecated-copy I'd've been fine hours ago. Many thanks for that, now doing just what I want. Also @JonB Thanks for your help too.
  • how to set app-ico ?

    Unsolved 8 days ago
    0 Votes
    6 Posts
    97 Views
    @J.Hilk said in how to set app-ico ?: shadow build because your not building inside your source file but all generated files are placed in a different folder As @J.Hilk said, I also think the issue is same, image is not in the shadow build folder @cuijg you can uncheck the shadow build checkbox and clean, build, run.
  • Qt6 and QT_ENABLE_HIGHDPI_SCALING

    Unsolved 5 days ago
    0 Votes
    5 Posts
    102 Views
    @hskoglund said in Qt6 and QT_ENABLE_HIGHDPI_SCALING: If you right-click on the .exe file, select Properties and in the Compability tab click the "Change high DPI settings" button, does any setting in that dialog box help the faulty scaling after QApplication is instantiated? Thanks for the suggestion but I think those settings effectively override the manifest (so startup only) and indeed I can change the setting on an exe so that it "supports" High DPI even when it doesn't and start it up and you can see scaling issues. Reverting it while it's running makes no difference. However, this is now moot as I decided to suck it up and change the legacy code to check for and support the system scaling. We have a fair number of these MFC apps and on some this will be a lot more work than others. This one is not too bad as the main client window is written using our Direct2D library which already supports such scaling. As expected Windows common controls support this out of the box and weirdly all our MFC dialogs also display scaled with the only apparent issue being the font text display appearing "thin" and somewhat faded. Not enough of a problem to care about.
  • qtservice for Qt6

    Unsolved 17 Mar 2025, 15:38
    0 Votes
    4 Posts
    226 Views
    I think it is necessary to port the Qt5 service library to Qt6. I haven't did it because the qt6 already built framework can't run on Windows 2016 machines and I have a lot of them. Qt6 requires Windows 10. So, up to now, I'm using Qt5.
  • System tray crash in macOS 16

    Unsolved 4 days ago
    0 Votes
    3 Posts
    55 Views
    @jsulm said in System tray crash in macOS 16: how is your question related to this thread? Forked now :)
  • 0 Votes
    6 Posts
    85 Views
    @Axel-Spoerl, I only wanted to discuss it with them, but you've all answered everything I wanted to know. (I don't mean I was speaking on their behalf.) Thanks, all!
  • Release of QT 6.9.2

    Unsolved 3 days ago
    0 Votes
    2 Posts
    68 Views
    Just see here and here.