Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • Weird behavior of QT windows on Linux

    Solved
    13
    0 Votes
    13 Posts
    282 Views
    deisikD
    The solution was to make the main window stay on bottom with the Qt::WindowStaysOnBottomHint flag set (yes, I can live with that) But if you have other ideas, please share
  • Headers not found

    Unsolved
    4
    0 Votes
    4 Posts
    73 Views
    L
    Seems to be solved by set(CMAKE_INCLUDE_CURRENT_DIR ON) but not quite sure (I have other errors). Why the ui compiler would include with < and < instead of " " ?
  • Terminal Output Of Application Outside of Creator

    Solved
    5
    0 Votes
    5 Posts
    147 Views
    D
    @JonB Thank you for your post. It turns out the AllocConsole() was the solution. It was a Windows problem I was unfamiliar with rather than QT. Have a great week!
  • Qt 6.10 and text encodings

    Unsolved
    16
    0 Votes
    16 Posts
    649 Views
    AndyBriceA
    @cristian-adam Thanks.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Embedding Lightweight Web Tools into Qt Desktop Apps — Best Approaches?

    Unsolved
    3
    0 Votes
    3 Posts
    125 Views
    A
    Please choose webview2, which has higher performance than QWebEngine and is easier to integrate than cef. refer to https://thinkinginqt.com/20250726_qt-web/20250726_qt-web.html
  • Custom QHeaderView doesn't adjust size

    Unsolved
    4
    0 Votes
    4 Posts
    111 Views
    SGaistS
    If you want to sort, why are you setSortIndicatorShown(false); ?
  • fusion style is bad in combobox

    Unsolved
    4
    0 Votes
    4 Posts
    116 Views
    Christian EhrlicherC
    I don't understand your problem - what exactly is wrong here?
  • How should i do to make a qwidget cover qvulkanwindow

    Unsolved
    3
    0 Votes
    3 Posts
    87 Views
    C
    @Pl45m4 i do that,and also dosen`t work.
  • QPageLayout gives result from wrong printer

    Unsolved
    1
    0 Votes
    1 Posts
    34 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • How to set it panel horizontally

    Unsolved
    3
    0 Votes
    3 Posts
    101 Views
    Pl45m4P
    @JacobNovitsky Actually you can when compiling QtCreator from source and modifying that bit of code. I don't know if the community license allows that Funny enough I've been talking with one of the QtCreator maintainers on the Qt Discord about that exact menu bar lately, because I was interested in how it's set up and done. I might want to use something similar in one of my personal projects (also VSCode has some sort of side menu bar where you select between run, extensions or file system view, for example)
  • The sub-object cannot display when i add the Q_OBJECT in my code

    Solved
    4
    0 Votes
    4 Posts
    104 Views
    B
    @ctrkalk Then I know the reason, it is not that it doesn't show, but the stylesheet doesn't work, so the widget is totally transparent. There're already quite a lot posts in the forum asking about subclassed QWidget's stylesheet not working. It is also documented: If you subclass from QWidget, you need to provide a paintEvent for your custom QWidget as below: ... But this is the first time I know that a subclassed QWidget without Q_OBJECT would have stylesheet working :) BTW, the simplest solution for this kind of problem (if you don't want to reimplement paintEvent) is to subclass QFrame instead of QWidget, or using palette instead of stylesheet.
  • Running clang tidy for a qmake project from the command line

    Unsolved clang-tidy qmake linux clang
    3
    1 Votes
    3 Posts
    2k Views
    J
    this Bash solution didn't work for me, on account of a multi-level project structure that i was dealing with. (at least, i think it was multi-level.) What did work for me was something akin to the following: qmake ./my_project.pro -spec linux-clang CONFIG+=release CONFIG+=DISABLE_DEVELOPER_MODULES CONFIG+=force_debug_info && /usr/bin/make qmake_all make -j $CORES VERBOSE=y all &>make_output.txt compiledb --parse make_output.txt mkdir build/yamls run-clang-tidy -p . -j $CORES -clang-tidy-binary $CLANG_TIDY_PATH -checks=-*,bugprone-*,clang-*,cppcoreguidelines-*,modernize-* -export-fixes build/yamls this gives me a bunch of moc_* complaints, but also complaints on my actual code. the moc_* complaints seem to be clang-tidy's complaints about Qt itself, so i filter those out.
  • Memory leaks in 6.9.1 that weren't there in 6.9.0

    Solved
    14
    1 Votes
    14 Posts
    889 Views
    PerdrixP
    For reference The debug pdb files available for Qt 6.9.1 and 6.10 WERE INSTALLED and I NEVER REFUSED to install them e.g. qwindowsd.pdb is there next to qwindowsd.dll
  • How to build qt-everywhere-src-5.15.16 when configure broken

    Unsolved uoia
    7
    0 Votes
    7 Posts
    290 Views
    SGaistS
    Hi, The pre-built Qt 6 for macOS is multi-arch.
  • QSqlQuery prepared statment using QString as a bind value

    Unsolved
    5
    0 Votes
    5 Posts
    89 Views
    Christian EhrlicherC
    @sairun said in QSqlQuery prepared statment using QString as a bind value: somewhow it doesn't get replaced as a regular string in the query. This would completely contradict the prepared query idiom... https://en.wikipedia.org/wiki/Prepared_statement
  • 0 Votes
    2 Posts
    54 Views
    S
    here is the thread backtrace: Process 2636 stopped * thread #18, name = 'QSGRenderThread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x19ea5a3ec) frame #0: 0x000000019ea5a3ec libsystem_c.dylib`__abort + 160 libsystem_c.dylib`__abort: -> 0x19ea5a3ec <+160>: brk #0x1 libsystem_c.dylib`abort_report_np: 0x19ea5a3f0 <+0>: pacibsp 0x19ea5a3f4 <+4>: sub sp, sp, #0x30 0x19ea5a3f8 <+8>: stp x20, x19, [sp, #0x10] (lldb) bt * thread #18, name = 'QSGRenderThread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x19ea5a3ec) * frame #0: 0x000000019ea5a3ec libsystem_c.dylib`__abort + 160 frame #1: 0x000000019ea5a34c libsystem_c.dylib`abort + 180 frame #2: 0x0000000103b9c060 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Abort() + 68 frame #3: 0x0000000103b9b728 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Die() + 212 frame #4: 0x0000000103b9b7d0 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) + 156 frame #5: 0x0000000103b9c190 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::UnsetAlternateSignalStack() + 100 frame #6: 0x0000000103b86a8c libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::Destroy() + 252 frame #7: 0x000000019eb1db88 libsystem_pthread.dylib`_pthread_tsd_cleanup + 448 frame #8: 0x000000019eb20968 libsystem_pthread.dylib`_pthread_exit + 84 frame #9: 0x000000019eb20278 libsystem_pthread.dylib`_pthread_start + 160
  • QFileDialog on different platforms

    Solved
    4
    0 Votes
    4 Posts
    203 Views
    P
    @Bonnie Thanks a lot! Required some tweaking but this solution worked. Works on both Mac Intel and Silicon. Added the switch to my main() with an if-statemet as I want it to affect all my dialogs when on a Mac. #if defined(Q_OS_MACOS) QApplication::setAttribute(Qt::AA_DontUseNativeDialogs, true); #endif Then in my editor file: static const QString kFilters = "C/C++/CS Files (*.c *.cpp *.cc *.cxx *.cs *.h *.hpp *.hh *.hxx);;" "Pascal Files (*.pas *.pp);;" "Python Files (*.py);;" "Ada Files (*.ada *.adb *.ads);;" "Qt Project Files (*.pro);;" "Text and Markup Files (*.txt *.json *.xml *.md);;" "All Files (*.*)"; QString fileName; #if defined(Q_OS_MACOS) // non-native dialog QFileDialog dlg(this); dlg.setWindowTitle(tr("Open File")); dlg.setFileMode(QFileDialog::ExistingFile); dlg.setViewMode(QFileDialog::Detail); dlg.setDirectory(QFileInfo(startDir).isDir() ? startDir : QFileInfo(startDir).absolutePath()); dlg.setNameFilters(kFilters.split(";;")); dlg.selectNameFilter("C/C++/CS Files (*.c *.cpp *.cc *.cxx *.cs *.h *.hpp *.hh *.hxx)"); // dlg.setOption(QFileDialog::DontUseNativeDialog, true); // if not set in main() if (dlg.exec() == QDialog::Accepted && !dlg.selectedFiles().isEmpty()) fileName = dlg.selectedFiles().constFirst(); #else fileName = QFileDialog::getOpenFileName(this, tr("Open File"), startDir, kFilters); #endif if (!fileName.isEmpty()) { openFile(fileName); }
  • Qt 6 compiles twice slower that Qt 5

    Unsolved
    16
    0 Votes
    16 Posts
    3k Views
    Y
    @Andy314 I have also encountered the same problem. Has the issue of slow qt6 compilation been resolved?