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.
  • Problem with connect invocation

    Solved
    3
    0 Votes
    3 Posts
    28 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
    457 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
    117 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
    83 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
    15 Views
    No one has replied
  • Size of QtWebEngine

    Unsolved
    5
    0 Votes
    5 Posts
    54 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
    38 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]
  • Strange QSettings issue with Qt6 on Jenkins

    Unsolved
    2
    0 Votes
    2 Posts
    31 Views
    Christian EhrlicherC
    Did you check if you can read the file locally? Is the path correct?
  • 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
    38 Views
    No one has replied
  • Issue in qvulkanwindow.cpp ?

    Unsolved
    6
    0 Votes
    6 Posts
    185 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
    37 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?
  • Trying to use AddressSanitizer with Qt on Windows

    Unsolved
    13
    0 Votes
    13 Posts
    194 Views
    J
    There are lots of differences in the command line options between VS and Qt. Basic project in both cases is the default GUI application. Qt: -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -fsanitize=address -Zi -MDd -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc /Fddebug\asan_test.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\..\dev\asan_test -I. -I..\..\Qt\6.9.0\msvc2022_64\include -I..\..\Qt\6.9.0\msvc2022_64\include\QtWidgets -I..\..\Qt\6.9.0\msvc2022_64\include\QtGui -I..\..\Qt\6.9.0\msvc2022_64\include\QtCore -Idebug -I. -I/include -I..\..\Qt\6.9.0\msvc2022_64\mkspecs\win32-msvc -Fodebug\ @C:\Users\jazzco\AppData\Local\Temp\main.obj.18184.15.jom VS: /JMC /permissive- /ifcOutput "WindowsASanTest\x64\Debug\" /GS /W3 /Zc:wchar_t /Zi /Gm- /Od /sdl /Fd"WindowsASanTest\x64\Debug\vc143.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /fsanitize=address /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"WindowsASanTest\x64\Debug\" /EHsc /nologo /Fo"WindowsASanTest\x64\Debug\" /Fp"WindowsASanTest\x64\Debug\WindowsASanTest.pch" /diagnostics:column The options differ in VS are: /JMC = Just My Code /WX- = Treat Warnings as Errors OFF /sdl = Enables recommended Security Development Lifecycle /Od = disable optimization /D <> = define constant/macro /Gm- = disable miminal build (deprecated) /RTC1 = Enable fast runtime checks /GS = Checks buffer security /fp:precise = "precise" floating-point model; results are predictable. /Zc:forScope = Enforce Standard C++ for scoping rules (on by default). /Fo<> = Creates an object file. /external:W3 = Set warning level for external headers. /Gd = Uses the __cdecl calling convention. (x86 only) /TP = Specifies all source files are C++. /FC = Displays the full path of source code files passed to cl.exe in diagnostic text. /errorReport = deprecated I added several options to Qt, like -JMC -GS -sdl -RTC1 to get it up but the process still crashes in debug mode at the same spot even with a clean default project without the faulty source code. In release mode it works but doesn't recognize the malicious code. EDIT: fixed wrong VS command line
  • 0 Votes
    13 Posts
    186 Views
    Axel SpoerlA
    Looks like the bug doesn't reproduce anymore.
  • 1 Votes
    7 Posts
    149 Views
    Christian EhrlicherC
    @Jammin44fm said in QT_ENABLE_HIGHDPI_SCALING misbehaving when windows scaling is set to 200%: QT_ENABLE_HIGHDPI_SCALING "This variable is intended for testing purposes only, and we do not recommend setting it on a permanent basis." So don't use it...