Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Mixing Qt C++ with Objective-C without Quick



  • Hello,

    Can somebody help me? I want to execute native ios file selection dialog, but cannot find any examples and documentations on how to use objective-C inside Qt applications without Quick.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Create a C++ header that contains the function you'll use to invoke the native file selection dialog.

    Then write a mm file that implements the function calling the Objective-C classes/code you need.

    Add the mm file to the OBJECTIVE_SOURCES variable.

    Then you should be good to go

    Hope it helps



  • Do you have any example with file selector and without qtquick?
    Cannot understand how it should work.


  • Lifetime Qt Champion

    I don't have code specific to the file selector, but you can take a look at the QtMacExtras module source code to see how you can mix C++ and Objective-C/C++


Log in to reply