Hi,

> Am 28.11.2024 um 05:20 schrieb Alexander Drozdov <adrozd...@gmail.com>:
> 
> Hi guys!
> 
> Maybe I'm wrong and such behavior already exists,

yes, it does! Running Qt Creator with "qtcreator -client <file>" opens files in 
a running Qt Creator instance if available and otherwise starts a new one (all 
platforms).

Cheers, Eike

> but... For the Linux systems (at least) I use the linked bash script to open 
> files in the current instance of the Qt Creator for editing.
> 
> The Idea is simple: scan parents using `ps -o ppid= -p ...` starting from 
> `$PPID` and search process with name `qtcreator`, if found - call it with 
> `... -pid $pid ...` parameter and pass file name.
> 
> Work like a charm for me.
> 
> Script: https://gist.github.com/h4tr3d/52a164b0e4cb51abab85ffcd32609035
> 
> Maybe useful for somebody.
> 
> -- 
> WBR, Alexander Drozdov
> http://htrd.su
> -- 
> Qt-creator mailing list
> Qt-creator@qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Str. 10
12489 Berlin, Germany
eike.zil...@qt.io
https://qt.io

Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B


-- 
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to