Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.2k Topics 455.5k Posts
  • 3 Votes
    29 Posts
    32k 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.
  • Problems with stacked Progress Dialogs

    Unsolved 3 days ago
    0 Votes
    12 Posts
    237 Views
    @SimonSchroeder Waw, this is realy helpfull (and not just a squeam in horror ;-), thank ypu! I will have a close look into your library and rework the whole lot in this way. Will take some time, but I'll give you feedback when it's done.
  • Is there any downside to static methode whit Qt

    Unsolved static about 17 hours ago
    0 Votes
    6 Posts
    61 Views
    @Pl45m4 C++ or static Qt linking/building? I don't know what that mean ... @SimonSchroeder I'm not sure where you got the idea that specifically, static methods cannot be called by different threads. Maybe I'm overthinking the fact that a static method will have all variable globals acces at the same time by multiple threads. Sins i have a real time programmation background, i'm overthinking everthing that touch shared ressources. And if you need to access protected methods maybe they should have been public instead. The method I want is public, but on an object i don't want to instanciate. And i maybe don't know how to call if it's instancied already. With Qt creator debugger i don't know where to search to find an existing instanciation of the object i need. @SGaist Out of curiosity, why do you need to reinstantiate the whole application ? Because the method i need is in a object where the constructor instanciate tons of other things. The whole application is maybe an exaggeration, I admit, but the whole data management, definetly -- I think it's a clear lack of experience on my part whit Qt, i say many thing that are maybe confusing experts with my approximate understanding of what i have on my hands and what i understand of Qt. I'm also really far to be an Expert on C++. The fact is that my static thing "work" by compilation and simple test, but i don't know if it may cause issue later that i may not have knowed
  • This topic is deleted!

    Unsolved about an hour ago
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • QT5.6.3 Example not running on IMX93

    Unsolved about 19 hours ago
    0 Votes
    5 Posts
    48 Views
    Hi @JoeCFD , our application supports Qt 5.6.3. Since we are not modifying the application layer, we are continuing to use version 5.6.3.
  • Collect a simple still image from USB camera

    Unsolved about 11 hours ago
    0 Votes
    2 Posts
    25 Views
    Refer to these classes for <QCamera>、<QCameraViewfinder>、<QCameraImageCapture>, which should solve your problem
  • 0 Votes
    9 Posts
    199 Views
    My Qt 5.15.2 and 5.15.13 instances perform the same way as the Qt 6 version above. Still could be a 5.15 vs. 5.9 difference. Could it be that Qt VS Tools is not passing the include path to moc?
  • Initial translation language with QTranslator

    Unsolved qtranslator 16 days ago
    0 Votes
    9 Posts
    423 Views
    Not sure why I am having so many problems in something which looks very straightforward. Nothing really seems to work. [image: b0f3e8c1-3c1d-40c6-9ad7-168ea335d4db.png] The only time that I have been successful in the User Interface displaying a non-default translation language was with QLocale::setDefault. I believe that I am just going to go and try with this approach. My overall language detection logic in main.cpp is going to be something like: 0. Check if user has already explicitly set an application language If that is the case, skip to step 3 This information is going to be stored in an external configuration file outside the application. 1. Detect user's default locale with QLocale::QLocale() 2. Check if user's default locale has an available translation in the application If they do not, either do nothing else, or explicitly change the current locale to match with the default translation language (for the sake of readability) I need to think exactly how I am going to match the results but QLocale has both QLocale::language() and QLocale::name() and that should be more than enough. 3. Change default locale to expected locale using QLocale::setDefault I am not planning in adding my languages to my application. So, I am not really worried about having a big switch statement.
  • Delete directory unsing QFile::moveToTrash()

    Unsolved a day ago
    0 Votes
    3 Posts
    57 Views
    @Zbigniew-Sch hi, Based on the documentation of the function, it should work. Did you check the permissions of the content of the folder you are trying to remove ?
  • Cache locality and QString

    Unsolved about 16 hours ago
    0 Votes
    1 Posts
    33 Views
    No one has replied
  • QT 5.15.5 not working on i.MX93 platform

    Unsolved about 19 hours ago
    0 Votes
    2 Posts
    23 Views
    @Akash_shinde said in QT 5.15.5 not working on i.MX93 platform: segmentation fault or core dump Did you analyze them?
  • Hide Grid Widget

    Unsolved a day ago
    0 Votes
    2 Posts
    45 Views
    @shreya_agrawal said in Hide Grid Widget: How can I do it? Remove gridWidget from the layout or change its size to 0
  • QSoundEffect device selection

    Unsolved 6 days ago
    0 Votes
    2 Posts
    81 Views
    Hi, Is this the Qt version that comes with your distribution ? If not, can you try that one ? Did you also check with a more recent version ? 6.9 was released no too long ago.
  • error IMKCFRunLoopWakeUpReliable

    Unsolved 4 days ago
    0 Votes
    4 Posts
    110 Views
    Did you try to restart your machine once between two runs to check if it still comes up ?
  • Throwing from QFuture::onFailed()

    Unsolved 7 days ago
    0 Votes
    8 Posts
    293 Views
    @Don-Burner said in Throwing from QFuture::onFailed(): I use std::set_terminate, so unhandled exceptions call my terminate handler. EDIT: I thought std::terminate() always called std::abort(). Turns out, it calls the current terminate handler. In short, calling std::terminate() within QFuture::onFailed() works, at least for my purposes. Thanks!
  • MacOS system tray issue

    Unsolved 1 Jun 2024, 10:10
    0 Votes
    7 Posts
    746 Views
    Just in case, the systray example from Qt's documentation works as expected on macOS so it I think it would be good to compare the two code bases to see what is being done differently. The MacOSSysTray implementation takes quite a lot of detours to achieve the same outcome as the systray example. So I would suggest to simplify things there.
  • 0 Votes
    3 Posts
    75 Views
    @jeremy_k I appreciate it. I successfully implemented that feature.
  • Remove default file association

    Unsolved 6 days ago
    0 Votes
    6 Posts
    242 Views
    @Christian-Ehrlicher said in Remove default file association: You can't do this with Qt as it's to OS-specific. You are certainly right about the first part. However, I would claim that this is something (at least up to a certain point) that could actually fall into the realm of Qt. All operating systems have some sort of file type association. Windows and macOS should be pretty straight forward. I am not entirely sure about Linux if this is related to the window manager. There is certainly a certain standard with xdgutils. But, I believe this is mostly for the command line and not used by every window manager. A lot of people would already be covered by supporting Gnome and KDE (maybe another 1 or 2 window managers). What I'm saying is that it is not too crazy to expect this to be part of Qt. QSettings properly stores configuration according to common platform rules (even uses the registry on Windows).
  • 0 Votes
    4 Posts
    284 Views
    @sirspot Hi and welcome to devnet, Please provide a complete minimal compilable example that shows this behavior.
  • Application bundle path

    Unsolved 4 days ago
    0 Votes
    9 Posts
    235 Views
    Sorry, I've misunderstood your goal. So QCoreApplication::applicationDirPath is the simple way to do it.