Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.3k Topics 455.9k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    3 Votes
    29 Posts
    33k Views
    A
    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.
  • Strange QSettings issue with Qt6 on Jenkins

    Unsolved
    4
    0 Votes
    4 Posts
    48 Views
    SGaistS
    Hi, In addition to the questions of my fellows, one thing to consider for the tests is to write the file to a known read/write path rather than relying on system defaults.
  • QProcess starting on macos only when run from terminal

    Unsolved
    5
    0 Votes
    5 Posts
    54 Views
    JonBJ
    @Axel-Spoerl If you are proposing calling QProcess::setProcessEnvironment() to change the PATH to include /usr/local/bin for the child, I think there is a 50-50 (or greater?) chance this will not affect the parent's ability to find and run the subprocess. I believe --- but not sure --- that the child process environment only affects what environment the child inherits after it has been spawned successfully. Changing PATH in this way won't help the parent find the child to spawn? I think we found this with QProcess::setWorkingDirectory(): you cannot use it in order to spawn some ./executable living in a directory because it is not set before the executable is spawned, it is only set for the child after it has been located and spawned. @cupboard_ If it is an issue finding ffmpeg why don't you start by trying proc.start("/usr/local/bin/ffmpeg", ...)? If that resolves, and QProcess::setProcessEnvironment() does not, you may have to change the PATH in the parent before spawning the child if you want it found via PATH.
  • Create signal with / from stdin

    Unsolved
    11
    0 Votes
    11 Posts
    3k Views
    T
    The fact that Qt does not implement a direct method to generate QIODevice-like signals for stdin implies that doing so is difficult or impossible. The problem with using a separate QThread in the child to generate signals by blocking on sys.stdin.readline() is getting that QThread to exit. QThread.terminate() does not terminate that QThread until a line of input is received. All related answers ignore this problem. I was able to workaround this by having the parent process feeding the child's stdin send "exit\n", and have the child's stdin-reading QThread detect that line and call its QThread.exit().
  • CMake problem with Qt 6.10.0

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • Problem with connect invocation

    Solved
    3
    0 Votes
    3 Posts
    39 Views
    PerdrixP
    @SGaist Thank you! This seems to work (well at least it compiles)! auto deepSkyStacker = DeepSkyStacker::instance(); connect(ui->help, &QLabel::linkActivated, deepSkyStacker, [=]() { deepSkyStacker->help(); }); David
  • How to disable linking with Qt6EntryPoint in Visual Studio?

    Unsolved
    4
    0 Votes
    4 Posts
    458 Views
    A
    I'm resurrecting this because I am facing the same issue. We are looking at Qt as a migration option from MFC (one of several). So I have VS Tools added to Visual Studio 2022. I have manually added the Qt "bits" to the relevant project file but I can't find a way of successfully adding this in to the Qt settings part for the project: CONFIG -= entrypoint I tried passing it on to qmake in the "Additional Command Arguments" but to no avail. There appears to be lots of things I could do with the "Qt Project Settings" within Visual Studio but if there's any documentation on this, I can't find it. TIA
  • Undefined symbol when trying to load a Wayland custom shell extension client plugin

    Solved
    9
    0 Votes
    9 Posts
    127 Views
    B
    @Christian-Ehrlicher said in Undefined symbol when trying to load a Wayland custom shell extension client plugin: Simply leave it empty so CMake will auto-determine the needed compilers. Yeah, if it's omitted it will default to C and CXX. The custom shell example has LANGUAGES CXX but that still works for the example.
  • How to get Qt5.15 on Windows ?

    Unsolved compile qt5.15.2 windows10
    5
    0 Votes
    5 Posts
    1k Views
    JKSHJ
    @DougyDrumz2 said in How to get Qt5.15 on Windows ?: I don't see any Qt5 Click the "Show" drop-down menu (in the upper-right corner of your screenshot), and select "Archive"
  • What is the best way to bypass PATH_MAX (on Linux)?

    Unsolved
    6
    0 Votes
    6 Posts
    95 Views
    RokeJulianLockhartR
    @Kent-Dorfman, yeah, it would be if these were part of a program. However, these are my own files manually-created files in my own data drive. Being able to manage them in a Qt-based file manager (like KDE's Dolphin) would be useful. A human can't feasibly interface with a database for every file transfer, and I don't want to fork Dolphin to add something so niche to it just for me, since that really wouldn't help anyone else.
  • How to create a TableView in QML

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • Size of QtWebEngine

    Unsolved
    5
    0 Votes
    5 Posts
    57 Views
    cristian-adamC
    The alternatives would be: QtWebKit. Last active 6 years ago. ladybird. No idea if there is a Qt port. servo. Written in Rust. Any others?
  • how to set app-ico ?

    Unsolved
    5
    0 Votes
    5 Posts
    44 Views
    J.HilkJ
    @cuijg the build folder, shadow build because your not building inside your source file but all generated files are placed in a different folder [image: 29b60078-8cea-469d-a959-350924591fb5.png]
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Accessibility for Custom Painted Items

    Unsolved accessibility screen reader focus issue
    1
    0 Votes
    1 Posts
    41 Views
    No one has replied
  • Issue in qvulkanwindow.cpp ?

    Unsolved
    6
    0 Votes
    6 Posts
    191 Views
    SGaistS
    You should check the bug report system to see if it's something known and if not, please open a ticket providing minimal compilable example that triggers the crash.
  • Specifying Color for progress bar in QProgressBar

    Unsolved
    5
    0 Votes
    5 Posts
    5k Views
    R
    I know I'm late the the game on this particular request, but I recently had the same need and found what I think is a better and easier solution. In particular, I liked the look of the base style and only wanted the color of the chunk, and for light colored chunks, have a dark text over it. The general principle is to make a copy of the QPalette for the QProgressBar in question. Then change QPalette::Highlight role color and the QPalette::HighlightText role based on the parameter being displayed in the copy and then assign the QPalette to the QProgressBar. Do this in the valueChanged(int) slot. In my example, I was assessing a motor speed. void MainWindow::on_TachometerBar_valueChanged(int value) { static QPalette p(ui->TachometerBar->palette()); //Static used here to only initialize once if (value < 600) { p.setColor(QPalette::Highlight, Qt::yellow); p.setColor(QPalette::HighlightedText, Qt::black); } else if (value < 1800) { p.setColor(QPalette::Highlight, Qt::darkGreen); p.setColor(QPalette::HighlightedText, Qt::white); } else if (value < 2000) { p.setColor(QPalette::Highlight, Qt::yellow); p.setColor(QPalette::HighlightedText, Qt::black); } else { p.setColor(QPalette::Highlight, Qt::red); p.setColor(QPalette::HighlightedText, Qt::white); } ui->TachometerBar->setPalette(p); } [image: 2a253b91-3d26-4d73-854c-af80d74579ee.png] [image: fffdcb68-1aa0-4487-8470-bcc6f6d706ba.png] [image: 0dc7e0c5-5377-4c7c-bc57-a883b7399bb8.png] [image: f31e6199-cbbe-4eec-8e87-e55a44b3e19e.png]
  • Dependent (that clearly exists) does not exist error when building Qt Creator project

    Unsolved
    24
    1 Votes
    24 Posts
    13k Views
    H
    @saurabhjadhav1911 Amazing! It works. Thank you very much!! But why?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • QWidget::mousePressEvent() fail to capture the left click event

    Unsolved
    4
    0 Votes
    4 Posts
    42 Views
    W
    @Pl45m4 Oh okay. I will have a look at the other part of the code. Do you know why the left click can be detected within the eventfilter? Does it mean that the event captured by eventfilter would be the higher priority?