Skip to content
  • 0 Votes
    14 Posts
    1k Views
    JonBJ
    @RuWex Please look at the QTimer documentation, and the examples there. This does not work by "inserting a delay" into the code where it is called. Rather, it sets off a timer which keeps running, and you supply a "slot"/"callback" which will be invoked when the timer expires. It is in that function/lambda that you do whatever work you wish to perform each time the repeating or singleshot timer expires, e.g. in your case maybe it sends the next character.
  • The command line is too long Qt5.14.2

    Unsolved General and Desktop pro release mode command copy files
    5
    0 Votes
    5 Posts
    988 Views
    S
    @JonB I removed the last line...ie copy cmd of folder "Settings" and then I was able to build properly in release mode.
  • 0 Votes
    8 Posts
    2k Views
    S
    When I researched having both a GUI and command line application on Windows I stumbled upon how Microsoft does it itself with devenv. They provide a .exe and a .com at the same time. If you call your software myapp then you should compile the GUI application to myapp.exe and the command line application to myapp.com. When typing myapp on the command line it will launch the .com version. What we did in addition is to have the two application call each other depending on the command line parameters. This is a better user experience than attaching a console. With qmake use an additional CONFIG to select between GUI and console (e.g. CONFIG+=console when calling qmake). In your main() have #ifdefs to switch between command line and GUI during compilation.
  • 0 Votes
    2 Posts
    1k Views
    C
    @aliemrenebiler said in Run a terminal command with a button click: QProcess is not working, the program never opens and says as output "QProcess: Destroyed while process ("...") is still running.". The problem would appear to be that your QProcess object goes out of scope (is destroyed) while the process you asked it to launch is still running i.e. exactly what the error message says. This is most likely because you have create the QProcess on the stack in the slot handling your button click, but it could be because it is parented to another QObject that is destroyed. We can only guess without seeing your code.
  • 0 Votes
    8 Posts
    2k Views
    jsulmJ
    @cstevenson Please also connect a slot to https://doc.qt.io/qt-5/qprocess.html#errorOccurred The process is probably not running when you call write().
  • Qt command error when nmake the odbc files

    Unsolved General and Desktop odbc command nmake
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, Looks like you've opened a x86 development command line rather than the amd64.
  • 0 Votes
    6 Posts
    6k Views
    SGaistS
    Glad you found out and thanks for sharing ! Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)
  • Compile my Qt project in Windows

    Unsolved General and Desktop qmake make command
    5
    0 Votes
    5 Posts
    2k Views
    jsulmJ
    @tomy Did you realize that you are looking in the wrong directory? MinGW is in c:\Qt\Tools\mingw492_32\bin! You should be more proactive and look by yourself instead of asking for exact answers. You can search in Windows-Explorer for *make*.exe On my machine I get 4 hits one of them is mingw32-make.exe
  • how to GATEWAY and DNS Setting? in linux

    Unsolved Mobile and Embedded command linux qprocess
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, First thing, you need to check that you have the rights to call ifconfig. Then you can grab the output from QProcess and parse it to get the data you want.
  • 0 Votes
    4 Posts
    2k Views
    SGaistS
    Good, then please mark the thread as solved using the "Topic Tool" button so other forum users may know a solution has been found :)