Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • How to Make QVTKOpenGLNativeWidget Background Transparent in Qt?

    Unsolved
    1
    0 Votes
    1 Posts
    154 Views
    No one has replied
  • Do not process QTimer slots while waiting for network response

    Unsolved
    4
    0 Votes
    4 Posts
    188 Views
    Pl45m4P
    @Tarae Hi, what about this? auto reply = networkAccessManager.get(myRequest); const QSignalBlocker blocker(yourTimer); connect(&networkAccessManager, &QNetworkAccessManager::finished, this, [=](QNetworkReply *reply){ // blocker.unblock(); // maybe not even needed doSomethngWithData(reply); });
  • qmake: /libQt5Multimedia.so and /libQt5MultimediaWidgets.so are incorrectly located

    Unsolved
    12
    0 Votes
    12 Posts
    635 Views
    nestoracN
    The project is published here, if I'm right (branch is version-2.0-stable).
  • void QWidget::setStyle(QStyle *style) and memory management.

    Solved
    2
    0 Votes
    2 Posts
    134 Views
    Christian EhrlicherC
    See the documentation: "Sets the widget's GUI style to style. The ownership of the style object is not transferred."
  • 0 Votes
    12 Posts
    3k Views
    S
    @KillerSmath Your example is great, exactly what i was looking for, but nevertheless, i noticed that this system breaks when there is rotation involved. I'm pretty new with all this but may you or anyone else can hint me the way on how get it working with rotation? Thanks alot beforehand. :)
  • Issue with software application that utilizes qt

    Unsolved
    20
    0 Votes
    20 Posts
    1k Views
    T
    @Pl45m4 said in Issue with software application that utilizes qt: The hex dumb mentions an .ini file somewhere in Resources. Have you checked all ini files you can find in the program folder? So for whatever reason, the exe mentions folders that don't seem to exist. There isn't any folder named Sunvega CncHmi2 in Resources and there is only a single ini file in the entire project which is debug.ini and it's contents are simply simul.enable = 1 simul.address = 0.0.0.0:0 I believe that the correct translation file isn't actually qt_en.qm but rather the .qm files found within resources, as the resources folder has many _en.qm files and examining them seems like they're translations of the ui. I tried linking the path in qt.conf as follows to no avail. [Paths] Documentation=../../Docs/Qt-5.13.2 Examples=../../Examples/Qt-5.13.2 Prefix=. Translations = Resources These attempts included variations like ./Resources and ../Resources but neither worked. @Pl45m4 said in Issue with software application that utilizes qt: And there is no way to contact the developers (i.e. the Chinese company) and ask for assistance with changing the language? Because the developer of the app as well as the distributor are located in China, coordinating times becomes incredibly difficult given the time distance, in addition to the language barrier. Even trying to track down anything related to the software is difficult. We did manage to track down the guy on whatsapp, but he kinda just told us that it still works in chinese and he might send us a video on how to fix it at some point. Hopefully that ends up pulling through. @Pl45m4 said in Issue with software application that utilizes qt: Do all the other translation files actually contain something? Or are these just placeholders? All of the language files have things in them ironically with the exception of the english file, however there seems to be another english file in the root directory which actually has things translated (though it seems like it doesn't involve ui elements). Thank you for all the assistance both you and everyone else have provided. People like you who help others out of the kindness of your hearts are amazing human beings. Hopefully this can get resolved soon!
  • MDI: QDialog modality locks Application instead parent QMdiSubWindow only

    Unsolved
    1
    0 Votes
    1 Posts
    57 Views
    No one has replied
  • Qt5.15.14 building from src with msvc2019 in Win10: strange error

    Solved
    2
    0 Votes
    2 Posts
    122 Views
    liscoL
    Probably it is a bug of unpacking tar.xz. Removed gargabe and compiler has continued... It was bugged unpacking tar.xz within WinRAR or 7z. They show directory ClamshellPhone.skin with wrong filenames as screen #1. TotalCommander's internal archiver shows content of ClamshellPhone.skin right.
  • How to build Qt 6.x.x for Windows with -MT compiler flag?

    Solved
    8
    0 Votes
    8 Posts
    879 Views
    N
    I solved this problem. A Ilittle bit rube, but works. Here are the patches if anybody needs them. :-) --- qttools/src/assistant/CMakeLists.txt 2023-09-24 09:45:36.000000000 +0100 +++ qttools/src/assistant/CMakeLists.txt 2024-08-13 18:50:42.744407900 +0100 @@ -17,21 +17,22 @@ return() endif() add_subdirectory(help) add_subdirectory(assistant) add_subdirectory(qhelpgenerator) set(QLITEHTML_BIN_PATH ${INSTALL_BINDIR}) set(QLITEHTML_LIBRARY_PATH ${INSTALL_LIBDIR}) set(QLITEHTML_LIBRARY_TYPE STATIC) set(BUILD_SHARED_LIBS OFF) -if(QT_FEATURE_static_runtime AND MSVC) +#if(QT_FEATURE_static_runtime AND MSVC) +if(MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") endif() add_subdirectory(qlitehtml/src EXCLUDE_FROM_ALL) if(TARGET qlitehtml) qt_autogen_tools_initial_setup(qlitehtml) # The litehtml and gumbo targets will not be available here if they are not built by Qt # but found in the system, because they are imported only to the subdirectory scope # where find_package was called. But that's fine, we wouldn't be able to set compiler flags # on them anyway. if(TARGET litehtml) --- qtmultimedia/src/3rdparty/resonance-audio/CMakeLists.txt 2023-09-24 11:12:48.000000000 +0100 +++ qtmultimedia/src/3rdparty/resonance-audio/CMakeLists.txt 2024-08-13 19:08:11.046330800 +0100 @@ -11,25 +11,25 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Static/dynamic runtime can be selected via -DSTATIC_MSVC_RUNTIME=ON|OFF macro(configure_msvc_runtime) if (NOT BUILD_WWISE_AUTHORING_PLUGIN) option(STATIC_MSVC_RUNTIME "Static linkage of MSVC runtime" ON) SET(MSVC_RUNTIME_FLAG "/MT" CACHE STRING "MSVC Runtime flag") - if (STATIC_MSVC_RUNTIME) + #if (STATIC_MSVC_RUNTIME) SET(MSVC_RUNTIME_FLAG "/MT") - else () - SET(MSVC_RUNTIME_FLAG "/MD") - endif () + #else () + # SET(MSVC_RUNTIME_FLAG "/MD") + #endif () message(STATUS "MSVC Runtime flag: ${MSVC_RUNTIME_FLAG}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_RUNTIME_FLAG}" CACHE INTERNAL "" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MSVC_RUNTIME_FLAG}d" CACHE INTERNAL "" FORCE) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MSVC_RUNTIME_FLAG}" CACHE INTERNAL "" FORCE) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${MSVC_RUNTIME_FLAG}d" CACHE INTERNAL "" FORCE) endif (NOT BUILD_WWISE_AUTHORING_PLUGIN) endmacro() macro(use_cxx11) set(CMAKE_CXX_STANDARD 11) --- qtbase/cmake/QtPublicTargetHelpers.cmake 2023-09-21 19:24:26.000000000 +0100 +++ qtbase/cmake/QtPublicTargetHelpers.cmake 2024-08-13 18:39:43.681027000 +0100 @@ -312,12 +312,17 @@ set(link_option PRIVATE) else() set(link_option INTERFACE) endif() if(CLANG) target_link_options(${target} ${link_option} "LINKER:-Bstatic") else() target_link_options(${target} ${link_option} "-static") endif() endif() + else() + if(MSVC) + set_property(TARGET ${target} PROPERTY + MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") + endif() endif() endfunction()
  • How To Detect if the User Closed the window?

    Unsolved
    11
    0 Votes
    11 Posts
    952 Views
    SGaistS
    Hi, If I have understood things correctly, wouldn't QInputDialog::getText do what you want ?
  • QSoundEffect not working in Qt 6.4.2 windows 10

    Unsolved
    5
    0 Votes
    5 Posts
    463 Views
    JonBJ
    @Kaguro Yes, setSource(QUrl::fromLocalFile(...)) looks like the correct way to specify a local file. qt.multimedia.audiooutput: Failed to set up resampler: Google for exactly that phrase. https://stackoverflow.com/questions/74500509/failed-to-setup-resampler-when-starting-qaudiosink tells you there is a Qt 6.4.x bug for exactly this, refers you to https://bugreports.qt.io/browse/QTBUG-108383 and tells you what to do. The Qt bug report tells you it was fixed in 6.4.3 but not 6.4.2.
  • QThread Worker Passing Large Quantities of Data from Stream to UI

    Solved
    6
    0 Votes
    6 Posts
    361 Views
    A
    Got it! Thanks for your help @Pl45m4 For those who are interested in this post, I ended up doing something slightly different here. I added a QQueue<unsigned char> data member in my Arduino class, and now, in the signal for the worker thread, I lock a shared mutex with the arduino object's thread. Then, in the slot which handles the stream of data coming in from the worker thread, I enqueue this data and then unlock the mutex. This way, I ensure that the data never gets jumbled up, and it also ensures proper memory access without risk.
  • Qt or win32 monitors the specified USB device

    Unsolved
    4
    0 Votes
    4 Posts
    214 Views
    W
    @Pl45m4 thank you
  • logging to different files via qInstallMessageHandler

    Solved
    6
    0 Votes
    6 Posts
    311 Views
    Christian EhrlicherC
    Then filter by a keyword in the text. I don't see that your usecase could be handled easier with other logging systems...
  • QtDesignerComponents.dll was not found

    Unsolved
    1
    0 Votes
    1 Posts
    73 Views
    No one has replied
  • [solved] Build Qt from sources: python.exe not found but it exists!

    Solved
    1
    0 Votes
    1 Posts
    183 Views
    No one has replied
  • QPrinter - Free Heap Block crash

    Unsolved
    4
    0 Votes
    4 Posts
    247 Views
    JonBJ
    @MHMart_asc That is "good", in that it implicates the QPrinter rather than anything else you might have. I don't have a solution, you will have to await someone else.
  • QtPlugins unresolved externals

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

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • 0 Votes
    2 Posts
    393 Views
    JKSHJ
    @gfxx said in qt6 qopcua :-1: error: You need to set an executable in the custom run configuration.: build process goes ok .. [ 98%] Built target DeclarativeOpcuaplugin_autogen [100%] Built target DeclarativeOpcuaplugin 01:44:32: The process "/usr/bin/cmake" exited normally. 01:44:32: Elapsed time: 00:01. but finish with You need to set an executable in the custom run configuration. so witch executable need to set? I believe you got that message because you tried to run your project. But you're building a library, so it doesn't make sense to run it. Your library should be built fine. Use your console/terminal to navigate to your build folder and run cmake --install .