Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Problems with translation files with Qt 6.8

    Solved
    3
    0 Votes
    3 Posts
    314 Views
    K
    Thanks for pointing that out, that is exactly the issue I have. According to related bug report I have removed set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) and replaced them by: qt_standard_project_setup() This seems to work for Qt 6.8.0 and also lower version (tested with 6.5.3). I am marking this issue as solved, thank you!
  • Cannot use QStringList defined in header file

    Solved
    4
    0 Votes
    4 Posts
    361 Views
    Pl45m4P
    @mono said in Cannot use QStringList defined in header file: I am kind of learning C++ as I progress with my Qt knowledge You should learn Qt as your C++ knowledge progresses, not the other way :) Solid C++ fundamentals are essential to enjoy working with Qt. You see what happens when you struggle with C++ basics ;-)
  • CMake qt_add_executable makes the build a Unicode build

    Unsolved
    4
    0 Votes
    4 Posts
    305 Views
    Christian EhrlicherC
    Qt does not need any kind of SBCS hacks so you don't need it either.
  • what does 'Slots named on_foo_bar are error prone' mean?

    Solved
    5
    0 Votes
    5 Posts
    10k Views
    sierdzioS
    @osirisgothra because Qt is old and already has a ton of production code out there in the wild. Suddenly removing functionality is not so easy, needs to go through deprecation first and then removal much later, in a major release - so earliest in Qt 7. On the other hand - connectSlotsByName() is convenient and useful. Some people may prefer it, or use it only in limited cases like in small test example / test / POC apps, just to code them quicker. Also at some point I think QML used this feature internally. Maybe I'm wrong though.
  • Difficulties creating CMake project using existing source files

    Unsolved
    3
    0 Votes
    3 Posts
    318 Views
    PerdrixP
    I found my error, the file was indeed correctly reported as "not found" (it was up one level in the heirarchy). But it wasn't in the build tree (even though the error message suggested it was/should have been)?????
  • How to extract text from PDF?

    Unsolved
    4
    0 Votes
    4 Posts
    667 Views
    hskoglundH
    Hi, on Ubuntu there's pdftotext (a.k.a. poppler-utils). Also there's a QPdfDocument class which has a getAllText() function. However it looks like you have to compile/build QPdfDocument yourself, i..e it's not included in the Qt installer.
  • Using QDBus without app.exec() or Event Loop - Is It Possible?

    Solved
    3
    0 Votes
    3 Posts
    268 Views
    L
    Hi SGaist, Thank you very much for the guidance. I ended up switching my event loop to an asynchronous loop to better integrate with Qt.
  • Can't access text codecs of ICU (Windows)

    Unsolved
    9
    0 Votes
    9 Posts
    749 Views
    J
    I could get it to work, too. First the linker failed but after adding the path to the icu dlls the build was successful. Thank you so much! Great work!
  • 0 Votes
    4 Posts
    264 Views
    Christian EhrlicherC
    @linuxkid said in (Porting old code - 5.14.2) Custom model derived from QAbstractItemModel receiving the wrong information?: nd take it in as QColor(value.toUint()) Use my solution as this is the correct one.
  • QOpenGLWidget not found in Qt version 6.3.0

    Solved
    17
    0 Votes
    17 Posts
    10k Views
    J
    @AnandRathi best way
  • Problems migrating from 5.14.2 tp Qt 6.8.0

    Solved
    11
    0 Votes
    11 Posts
    836 Views
    L
    @Christian-Ehrlicher Hey man, thanks for the pointings, and unluckily (even if fixed) I do not understand why it was happening (which troubles me more, perhaps its undefined behaviour). I only moved the shared object from one line to the top of the declarations, as part of an effort to tidy up the place, and that seemed to have done it. The debugger was pointing to the instance not being alocated/initialized before being used on the main window, instead of the main file. Maybe I do need to keep an eye at it and fix it more definetly, but since time was running short, I left it to "tech debt" for the future. Thanks for the time spent though, next time beers are on me!
  • QT Graphics card selection or detection

    Unsolved
    2
    0 Votes
    2 Posts
    217 Views
    C
    Hi, Just a thought, because I am not familiar with this subject: shouldn't you figure out why the app crashes instead of working around it?
  • using Qpainter with widget?

    Unsolved
    4
    0 Votes
    4 Posts
    290 Views
    C
    Hi, You'd most likely get better help if you specify exactly what you're working with and want achieved. What app are you trying to make? What's "some simple stuff" exactly? Why do you think QPainter is what you need? What platform are you targeting? I also have no idea what this means: selection menu for different parameters an a command line. but that's probably because I am dense.
  • 'Excel like' Alphabetically Enumerated Horizontal HeaderView for QTableWidget

    Solved
    7
    0 Votes
    7 Posts
    487 Views
    JonBJ
    @InTheBeninging I understand, and that is why I acknowledged the alternative was "neater". I would just point out that you can look for column insertions/deletions (horizontalHeader()->sectionCountChanged() signal) and act on that. I just thought that might be simpler than your original approach code, though the proxy insertion looks better.
  • QSvgRenderer incorrectly renders text

    Unsolved
    10
    0 Votes
    10 Posts
    887 Views
    C
    See if this helps: https://stackoverflow.com/questions/79035683/svg-text-is-incorrectly-overlapping
  • Accessing to a resource set in qt_add_qml_module from C++

    Unsolved
    3
    0 Votes
    3 Posts
    307 Views
    GrecKoG
    The default path of resources with qt_add_qml_module should now be qrc:/qt/qml/<module name>. When in doubt you can use QDirIterator to recursively iterate over your qrc: folder to see what's in it. Using GammaRay is also a solution.
  • Problems Connecting to QMainWindow::repaint()

    Unsolved
    24
    0 Votes
    24 Posts
    4k Views
    JonBJ
    @Pl45m4 My last personal observation. Overloads are so easily coded, I always: Stick in without qOverload() and see if compiler/code model tells you overload needed. 99% not, 1%... ...Look up desired overload in docs and put into qOverload<>(). If compiler did not complain it would be harder, but it does.... #2 takes a few seconds. So I don't get the problem.
  • Problem with 2 different libraries each having it's own rcc file.

    6
    0 Votes
    6 Posts
    4k Views
    O
    @IBM1401 Your problem is a bug in Qt 6.8.0 (or CMake).
  • OpenGL error when trying to use QT_QPA_PLATFORM=offscreen

    Solved
    6
    0 Votes
    6 Posts
    2k Views
    B
    One final update on this as I have since realised that QT_QUICK_BACKEND=software alone was not sufficient on Linux. I had to set both that and the offscreen plugin to get it working.
  • Error popups about library entry points

    Unsolved
    9
    0 Votes
    9 Posts
    594 Views
    PerdrixP
    Yes, specifically C:\Users\amonra\Documents\GitHub\DSS\x64\Debug is the debug build output folder and that's where all the files in question are - either placed there by building my code, or by windeployqt (for the Qt dlls). I just checked and (at least) the OpenGL dlls in the debug directory were back level compared to the Qt 6.8.0 installation while the release directory had the correct ones. I manually deleted everything from the build output dirs and re-ran the build, after which of course it worked as I expected. How/why there were some back level dlls in the Debug directory ????