Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Individual formatting of a QTableWidget's column

    Unsolved
    5
    0 Votes
    5 Posts
    889 Views
    l3u_L
    @JonB Oh, I didn't know you could install a delegate for just one column. I think that will work then, I'll try this. Thanks for the hint :-)
  • Custom "Slider"

    Unsolved
    2
    0 Votes
    2 Posts
    260 Views
    C
    @qt-1234 Could you share the code you're using to drag the "Off button" label and any code related to it? And show us exactly how it goes off your desired Y-Axis, take a screenshot or a GIF if possible.
  • Problem with QString storing file path

    Unsolved
    5
    0 Votes
    5 Posts
    427 Views
    Christian EhrlicherC
    @MyNameIsQt said in Problem with QString storing file path: CBackground::CBackground(unsigned int cnt, const QString &fileName, const QImage &img) : m_pBkgndHeader{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, m_strBkgndImagePath(&fileName) Hello dangling pointer... c++ basics.
  • Slow application with low CPU usage

    Unsolved qthread cpu usage slow
    12
    0 Votes
    12 Posts
    3k Views
    L
    Thanks for your suggestions, @J-Hilk @J-Hilk said in Slow application with low CPU usage: I would suggest emitting a signal, signalling data is processed, and then a mutex guarded getter function, that allows the other thread to access the required data. I'm not sure I understand what you mean. Should each object have a mutex-guarded getter function? Should the objects be in different threads? In this case, wouldn't the emitted signal get queued? I'd appreciate it if you could provide me an example and/or some material for further reading. Another idea that has occurred to me is that I could use two threads, one for processing and one for GUI (this one updated just from time to time). Do you think it would make sense? My concern is that the processing thread must be fast enough to complete its cycle before a new piece of data comes in. If this is the case, would it be necessary to use a mutex anyway?
  • Selection rectangle not shown or partially shown

    Unsolved
    1
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • Problem with-fPiC and -fPIE (CMake + conan)

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    V
    @mhanusek https://stackoverflow.com/a/58510085 If the target is a library, the flag -fPIC is added by CMake to the compilation and linker steps. If the target is an executable, the flag -fPIE is added by CMake to the compilation and linker steps. This helps: add_executable(exe_name ... ) target_compile_options(exe_name PRIVATE -fPIC)
  • Bluetooth 'heartrate-server' advertising error

    Unsolved
    1
    0 Votes
    1 Posts
    158 Views
    No one has replied
  • text fields and buttons are displayed incorrectly WIN11 Qt Creator 4.12.3

    Unsolved
    11
    0 Votes
    11 Posts
    449 Views
    jsulmJ
    @kendo To make it clear for the future: @Christian-Ehrlicher asked you which Qt version you are using! What you are showing is the Qt version which was used to build QtCreator... You should know what Qt version you installed, you can also check the Qt version in QtCreator configuration in "Kits" tab.
  • Include webp.lib to project

    Solved
    7
    0 Votes
    7 Posts
    693 Views
    M
    @ChrisW67 I don't think this is an error in running WebPConfigInit. Because it doesn't execute the function.
  • Remote debug in Windows using MSVC

    Unsolved
    1
    0 Votes
    1 Posts
    568 Views
    No one has replied
  • Native titlebar on macOS with accessory views

    Unsolved
    4
    0 Votes
    4 Posts
    220 Views
    SGaistS
    Hi, You might want to check this project which aims to help with regard to customize the NSWindow in a similar fashion as want you want.
  • QLineEdit

    Unsolved
    20
    0 Votes
    20 Posts
    2k Views
    Christian EhrlicherC
    @SimonSchroeder said in QLineEdit: This assumes that the value returned by the SQL query is in the proper encoding for a QString. As you mentioned the encoding of your DB is UTF-8. No, you're wrong. When the column type is a valid string-type (e.g. text, varchar, ...) then a QString is returned. The problem here is that it's either not a valid column type for a string or (which I assume) the internal conversion to a QString is wrong - but I will not touch Qt5 sources, it all works correct in Qt6.head.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • Remove the light blue overlay on the icon in QListWidget IconMode.

    Unsolved
    4
    0 Votes
    4 Posts
    413 Views
    C
    Do you need it to not appear at all? or is it okay for it to appear then get removed? Also, how do you select a thumbnail? And what happens when you select a thumbnail? Or is this just a gallery, a display or something like that where you don't want anything to happen? Mentioning your use case would make it more clear to us, and help us suggest an approach that works for what you're trying to do.
  • 1 Votes
    3 Posts
    9k Views
    X
    https://forum.qt.io/topic/121958/cmake-error-with-msvc-in-clion/7
  • Can I change the size of the box used to show the detailed text inside QMessageBox?

    Unsolved
    3
    0 Votes
    3 Posts
    362 Views
    S
    @jsulm I use setDetailedText because I want to hide all the details at first. The problem is that when the user clicks in the show details button the text box shown is too small.
  • QTimer does not fire slot

    Unsolved qtimer failed
    6
    0 Votes
    6 Posts
    1k Views
    JonBJ
    @ulix You have a QTimer in a thread which does not run the Qt event loop, does it? So no signals will be delivered. Hence your finding: The timer expires but the slot never gets called, by the way if a I call QCoreApplication::processEvents(); after the sleep time the slot gets called. That processEvents() is the first time the evet loop is invoked. Your thread needs to be running the event loop all the time if that's where the timer is ticking (unless you move the timer to the main UI thread). See QThread::run() & QThread::exec().
  • 0 Votes
    2 Posts
    159 Views
    JonBJ
    @Dummie1138 What does "being edited" mean for a QSpinBox? The only thing you can check for is whether it has focus. There is no editingFinished signal. Separately: you have a timer expiring every second and code in ticker() which adds 1 second for the time to show. How accurate do you expect this to be? The timeout may occur any time after 1 second has elapsed. You should not rely on it expiring at exactly one second. This may mean your time "wanders" over a period. Suggest you use a QElapsedTimer or re-read the wall clock time and subtract the start time periodically.
  • Built application display components not correct

    Unsolved
    3
    0 Votes
    3 Posts
    324 Views
    SabracS
    @jsulm my UI created using qtcreator ui designer, the app still run normal, no stuck, no "not responding"
  • QTableWidget

    Unsolved
    3
    0 Votes
    3 Posts
    225 Views
    JonBJ
    @Umer As @jsulm says. Note that a widget (or for that matter a layout), such as a "table", is an actual object and cannot be in two places at the same time. If you want it to appear on the main window and also elsewhere on another window you need to create separate instances.