Important: Please read the Qt Code of Conduct -

Get QString from Combobox and use in QPushButton system() call?

  • I'm kinda new to Qt and I want to create a simple interface for a command a command line program. I figured the easiest way to do this with was to use comboBoxes to select the required options then concatenate them together into a single string and use that for system() But I'm having all kinds of trouble actually getting it to work. I have the idea for what I want the program to do. Where should I look for some good examples of programs with currently working syntax for Qt5 C++

  • Lifetime Qt Champion

    Qt has a much better alternative that system();
    Its called QProcess.

    QString program = "./path/to/Qt/examples/widgets/analogclock";
    QStringList arguments;
    arguments << "-style" << "motif"; // each argument with << 
     QProcess myProcess;
    myProcess.start(program, arguments);

  • @vailixi Hi! The wiki has a nice article for newcomers:

Log in to reply