Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • How automation on qt?

    Unsolved mouse automation screenshot
    3
    0 Votes
    3 Posts
    597 Views
    jsulmJ
    @timob256 I'm not sure whether you want to animate the mouse cursor movement, if that is what you want then take a look at https://doc.qt.io/qt-5/animation-overview.html
  • Crash in closeEvent()

    Solved
    3
    0 Votes
    3 Posts
    392 Views
    deisikD
    It turned it out to be a system-wide issue after an uptime of couple months or so. Any program (for example, Firefox) would be forcefully closed after a few seconds if it showed a warning dialog box on exit
  • Ubuntu 22.04 with Qt 6 Crash

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    D
    An update for anyone who comes across this: It was an issue with the amdgpu drivers and default package manager Vulkan libraries. To get everything working with wayland, I first downloaded amdgpu_install deb package from AMD drivers page (just filled in GPU info and it brought me to the download page) - they call it "Radeon Software for Linux". Installed the deb once downloaded (used apt install on it). Once installed, amdgpu_install is available to use in the terminal. Read the instructions for which options to use when running amdgpu_install. I went with: amdgpu_install -y --vulkan=amdvlk,pro --opencl=rocr,legacy --accept-eula Once the driver is installed (with reboot), the newest vulkan SDK needs to be installed. This is easily missed but it's mentioned in the driver page "Release Notes". I just went to https://vulkan.lunarg.com/sdk/home and followed the instructions to install the latest SDK using the package manager - the apt instructions for me were: wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.250-jammy.list https://packages.lunarg.com/vulkan/1.3.250/lunarg-vulkan-1.3.250-jammy.list sudo apt update sudo apt install vulkan-sdk I could see the above command installing a bunch of qt wayland libraries so I was hopeful. Sure enough, once complete, the crash was gone.
  • How to capture double click on title bar

    Unsolved
    2
    0 Votes
    2 Posts
    490 Views
    M
    @deisik Hi, Mainly, it's OS dependent (on Linux linked to the Window Manager) Personally, on mac, I have choosen the zoom option instead of minimize and I would not really appreciate some apps to pass over my choice :)
  • how can i set QDockWidget without close button?

    Unsolved
    9
    0 Votes
    9 Posts
    5k Views
    O
    scenesDock->setFeatures(QDockWidget::NoDockWidgetFeatures); did the job for me if you still have the problem i believe this will solve the issue
  • Detect changing devicePixelRatio

    retina devicepixelrati
    7
    0 Votes
    7 Posts
    10k Views
    I
    @fxxxx you should set attribute for your main window: setAttribute(Qt::WA_NativeWindow); but it causes optimization problems, because it is legacy feature. anyway, it will solve your problem, and windowHandle() should return valid pointer, and will emit signal screenChanged().
  • call w.show() in another Thread

    Unsolved
    3
    0 Votes
    3 Posts
    238 Views
    S
    All GUI calls have to go through the main thread. You can, however, put the call to w.show() from another thread into the main thread. Using signals and slots was already mentioned. I personally don't like to write a whole bunch of signals and slots for this. What I do instead is to use QMetaObject::invokeMethod(qApp, [&w](){ w.show(); });. qApp will give you the instance of QApplication and invoke the lambda in the context (i.e. the thread) of qApp). You need to make sure that any work related to your window still executes inside another thread. I have put all my knowledge and different use cases particularly related to this question into a library: https://github.com/SimonSchroeder/QtThreadHelper
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • QSettings - make INI format case-sensitive on windows

    Unsolved
    5
    0 Votes
    5 Posts
    909 Views
    T
    @SimonSchroeder I will try this ... just have to find the writeFunc code in the Qt codebase ...
  • Documentation required for the sale of software under the LGPL license

    Unsolved
    17
    0 Votes
    17 Posts
    966 Views
    JonBJ
    @SimonSchroeder For "TQtC" as @jsulm wrote :) GPL in particular (under which several Qt components are released) requires users to release the full source of their code. Paying TQtC for a commercial license frees the author of that requirement, which I guess can be very useful for a commercial developer. For the (majority) LGPL parts I imagine it also frees them from the responsibility of maintaining Qt source access for customers (not sure about this one, just a presumption).
  • This topic is deleted!

    Unsolved
    9
    0 Votes
    9 Posts
    50 Views
  • QThread issue of one thread calling another thread

    Unsolved
    9
    0 Votes
    9 Posts
    555 Views
    M
    @micha_eleric said in QThread issue of one thread calling another thread: changing class CClass3 : public QThread to class CClass3 : public QObject fixed issue, along with issues raised from change
  • Displaying RTP video stream in QML using ffmpeg backend in Qt 6.5

    Unsolved ffmpeg qtmultimedia qt6.5
    1
    1 Votes
    1 Posts
    831 Views
    No one has replied
  • Task icon is blurred

    Solved
    1
    0 Votes
    1 Posts
    185 Views
    No one has replied
  • additional arguments to slot

    Unsolved
    3
    0 Votes
    3 Posts
    252 Views
    O
    @Chris-Kawa brilliant, many thanks
  • Can't move window to center of screen.

    Solved
    5
    0 Votes
    5 Posts
    509 Views
    V
    @JonB Unfortunate. Thank you very much.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • touch event in qml does not propagate to its parent qquickwidget

    Solved
    8
    0 Votes
    8 Posts
    857 Views
    JoeCFDJ
    @JoeCFD the problem is solved. But there may be better solutions. I will mark it as solved.
  • Remove space between images and text in flowlayout

    Solved
    8
    0 Votes
    8 Posts
    746 Views
    beautifulcloudB
    Hey @mpergand Thanks for that test, that's the goal I'm looking for I thought it was a change depending on the versions but no Actually @JonB the problem was there, since I had put in the css style of the parent widget QWidget I thought that its border would apply only to this one, but I forgot that it was necessary to specify QWidget#id and that caused borders on the child elements. How to drown in a drop of water [image: f495199e-1aee-45d9-ab17-177ec94b8516.png] thank you to all of you :)
  • How to avoid floating point problems?

    Solved
    15
    0 Votes
    15 Posts
    2k Views
    JonBJ
    @mhn2 Certainly you should discuss. But I believe you are laboring under a misunderstanding/assumption here. You are thinking if you can get the number 13.23 or the string "13.23" into the file that will make it so when the reader fetches it it will convert those digits which make up a string (even if it's stored as a 13.23 number the JSON will still have to convert string to number when it reads it) to exactly the binary, floating point representation of 13.23. But it won't, because (I believe) you are showing that the IEEE binary representation of 13.23 simply is 13.229999542236328, and that's as close as you going to get whatever you do.