<p>我建议你不要使用pyqt5,它太复杂了,也不要因此讨厌编程。用python编写代码好吗?在python中使用argparse,这样我们就可以在终端调用它,然后创建visualstudio并打开c#project设计自己的ui,然后使用args调用.py文件。在</p>
<pre><code> timer1.Enabled = true;
progressBar1.Value += 10;
string myPythonApp = "C://Users//giris//Desktop//staj_proje_son//main.py";
string cmdArguments = "/c \"python " + myPythonApp + " " + " ogrencioptik " + textBox2.Text + " " + " cevapkagidi " + textBox1.Text + " " + " sonuckayit " + textBox3.Text + "\"";
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = "cmd.exe";
start.UseShellExecute = false;
start.WorkingDirectory = "C://Users//giris//Desktop//staj_proje_son//";
start.Arguments = cmdArguments;
start.RedirectStandardOutput = false;
start.RedirectStandardError = true;
start.CreateNoWindow = true;
Process process = Process.Start(start);
timer1.Start();
process.WaitForExit();
timer1.Stop();
timer1.Enabled = false;
progressBar1.Value = 100;
MessageBox.Show("İşlem Bitti");
button3.Enabled = true;
</code></pre>
<p>这是我的c调用python进程代码。试试这个,喜欢编程。简单想想。祝你有美好的一天。在</p>