开发者

Using Qt in a pre-existing x-platform project?

开发者 https://www.devze.com 2022-12-14 01:54 出处:网络
I have an existing cross platform project that runs on Mac, Linux and Windows.开发者_JAVA百科 Now, I want to add a \'native\' UI to it - the ability to show some popup windows (to request user crede

I have an existing cross platform project that runs on Mac, Linux and Windows.开发者_JAVA百科

Now, I want to add a 'native' UI to it - the ability to show some popup windows (to request user credentials) and perhaps FileOpen dialogs. By native I mean I want to use the systems build in file-open dialog - so on the Mac the mac file finder is shown and on Windows the shells file open window is shown.

Qt seems a good fit - its samples show that it can show the correct dialog on all platforms.

However, all the available Qt samples start at the very base level - assuming the entire project is developed in Qt. Is it possible to initialize and use Qt in a more ad-hoc fashion :- i want to keep all my Qt UI code in a seperate dll/dylib/so file with some simple exports (think ShowLoginPopup).


I think that the easiest approach would be to do it the other way around - having the Qt GUI drive the rest of the application. Qt is event based and does rely on its event loop, so you need to keep that running.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号