Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • This topic is deleted!

    Solved
    3
    0 Votes
    3 Posts
    14 Views
  • This topic is deleted!

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

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QGuiApplication::focusWindow() always return null in wayland platform

    Unsolved
    4
    1 Votes
    4 Posts
    965 Views
    M
    @Ggwp1234 I think you should show a window in the first place, or maybe you mean to use applicationStateChanged signal ?
  • File names should be lowercase?

    Unsolved
    4
    0 Votes
    4 Posts
    327 Views
    SGaistS
    @AndrzejB the installer does nothing in that regard. They are generated if memory serves well.
  • Newbie questions: installation, setup, licences etc.

    Unsolved
    5
    0 Votes
    5 Posts
    297 Views
    C
    @cdvo I found my way. I removed all designer*.qm files under the translation folder but left the en one. Thanks
  • String and implicit sharing

    Unsolved
    2
    0 Votes
    2 Posts
    186 Views
    Christian EhrlicherC
    As long as you don't access the object via a non-const function there is only one QString instance with '"some Text"'.
  • QT Creator gtest error

    Unsolved
    3
    0 Votes
    3 Posts
    236 Views
    R
    @jsulm No it does not build.
  • How to fix application crash under Win11

    Unsolved
    4
    0 Votes
    4 Posts
    997 Views
    JonBJ
    @Oeschi said in How to fix application crash under Win11: ExceptionCode: 0xe0464645 Searching for this seems to generate hits all to do with NVidia gfx card? In dwm.exe.
  • How do i Change my role to get the community edition of Qt?

    Unsolved
    2
    0 Votes
    2 Posts
    296 Views
    jsulmJ
    @Amos-graham No need to change anything in your account. Simply select the OSS version when installing Qt.
  • QtSerialPort and FTDI Driver Issues

    Unsolved
    4
    0 Votes
    4 Posts
    797 Views
    Christian EhrlicherC
    @samfallday said in QtSerialPort and FTDI Driver Issues: I assume these other 3rd party programs are built on the Windows API and that is what makes the difference. Qt is using the same windows api as other tools - they don't add some magic new functions to Qt. You have to find out what they're doing different to Qt.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • snap7 and Qt Creator

    Solved
    12
    0 Votes
    12 Posts
    2k Views
    M
    @markolino_it please how can i do step 1 (compile the library with file.bat)
  • macOS universal binary: repeated Documents access requests

    Unsolved
    4
    0 Votes
    4 Posts
    921 Views
    D
    @jgibson If it keeps asking for permissions there might be a problem with code signing of your app. I would try codesign -s - --deep <MyApp>.app and see if it fixes the problems on your machine. If you move it to another machine you will have to do it there again because it will have an ad-hoc signature which is not transferable.
  • This topic is deleted!

    Solved
    2
    0 Votes
    2 Posts
    26 Views
  • Compilation issues when using #include<filesystem>

    Solved
    13
    0 Votes
    13 Posts
    4k Views
    JonBJ
    @rowan-Samy Seriously? Install Qt 6.2.3. Install (may come with the Qt version) and use (select as kit) MinGW 9.0.0. See whether your problem has gone away. If not then it appears you have a different problem from @pingal so there's no point asking him what he did.
  • 0 Votes
    2 Posts
    358 Views
    M
    @gaojinhsu said in Unity player embedded into Qt application, the video game dosen't response to keyboard and mouse wheel events any more.: The game itself can response to keyboad, mouse wheel, mouse move and mouse click events, but when I embed unity player into Qt application, the game dosen't response to keyboad and mouse wheel events any more. how to fix it ? typedef struct MyData { HINSTANCE hInstance; HINSTANCE hPrevInstance; LPWSTR lpCmdLine; int nShowCmd; } MYDATA, * PMYDATA; DWORD WINAPI MyThreadFunction(LPVOID lpParam); int main(int argc, char *argv[]) { QApplication a(argc, argv); HINSTANCE hInstance = GetModuleHandle(NULL); LPWSTR lpCmdLine = GetCommandLineW(); QWidget w; w.show(); QString cmd = " -screen-fullscreen 0 -popupwindow -screen-width 1920 -screen-height 1280 -popupwindow -parentHWND " + QString::number(w.winId()) + " delayed "; qDebug() << "lpCmdLine " << cmd; wchar_t ss[1024]; cmd.toWCharArray(ss); PMYDATA pData = (PMYDATA)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MYDATA)); pData->hInstance = hInstance; pData->hPrevInstance = NULL; pData->lpCmdLine = ss; pData->nShowCmd = 10; DWORD dwThreadId; CreateThread( NULL, // default security attributes 0, // use default stack size MyThreadFunction, // thread function name pData, // argument to thread function 0, // use default creation flags &dwThreadId); // returns the thread identifier //UnityMain(hInstance, NULL, ss, 10); return a.exec(); } DWORD WINAPI MyThreadFunction(LPVOID lpParam) { PMYDATA pData = (PMYDATA)lpParam; UnityMain(pData->hInstance, pData->hPrevInstance, pData->lpCmdLine, pData->nShowCmd); return 0; } This can be a bit tricky, as you're dealing with integration between two different frameworks. Here are a few steps you can consider to troubleshoot and fix the issue: Check Unity Input Settings: Make sure that the Unity game's input settings are properly configured to respond to keyboard and mouse events. Check the Input Manager in Unity to ensure that the desired keys and mouse buttons are correctly set up. Focus Issues: Sometimes, focus issues can prevent keyboard and mouse events from reaching the Unity game. Ensure that the embedded Unity player has the correct focus when running within the Qt application. You might need to handle focus changes and forwarding events appropriately between Qt and Unity. Event Handling: Unity and Qt have different event handling systems. Make sure that Unity is receiving and processing the events correctly. You might need to capture the Qt events and translate them into Unity events. Cross-thread Communication: It seems you're using a separate thread for Unity (MyThreadFunction) and the main thread for Qt. Ensure that you're correctly synchronizing and communicating between these threads, as UI events might need proper synchronization. Qt Event Filters: You can use Qt's event filtering mechanism to intercept and forward events to the embedded Unity player. This involves subclassing QObject and implementing eventFilter() to capture and forward events. Unity Build Settings: Double-check the build settings of your Unity project. Make sure that the input modules are correctly configured to handle the input events you expect. Debugging: Use debugging tools in both Unity and Qt to diagnose the issue. Log messages, breakpoints, and debugging tools can help you identify where the events are getting lost. Unity Player Logs: Check the Unity player logs for any error messages or warnings related to input events. This might give you insights into what's going wrong.
  • how to reconnect udp socket from 1 ip address to another address

    Solved
    3
    0 Votes
    3 Posts
    396 Views
    V
    @Pl45m4 thank you
  • Detect application running or not. How?

    Unsolved
    4
    0 Votes
    4 Posts
    545 Views
    B
    @J-Hilk Thx. Will try it out today or tomorrow.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied