简体   繁体   中英

how to set a notepad made with Qt as the default text editor in windows

i made a notepad with qt creator following the example from qt website documentation. it works fine, i deployed it ,made an installer. but i can't make it as default program for text files. i want to open a text file with it without launching the app and clicking open and choosing the file location. is there a code to add. i didn't know exactly what to search for. (i'm new to coding)

link to the example: https://doc.qt.io/qt-5/qtwidgets-tutorials-notepad-notepad-cpp.html

i've used another installer maker that have a file associations parameter, with that my app been added to default programs. and i modified the code to get the file path from command line parameters argv[1].

and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM