OlivierLDff / QtIosCMake

📱 Deploy Qt Application for iOS with a single macro when using CMake.
BSD 3-Clause "New" or "Revised" License
58 stars 15 forks source link

not full screen? #5

Closed davemilter closed 4 years ago

davemilter commented 4 years ago

It basically works. I update my demo project https://github.com/davemilter/qt_ios_libs_bug.

But strange thing that the project looks different if compile with cmake and qmake. The qmake project have no mention of full screen or something, it is just few lines: https://github.com/davemilter/qt_ios_libs_bug/blob/master/foo.pro

IMG_0188 PNG IMG_0187 PNG

The same thing with https://github.com/OlivierLDff/QQuickStaticHelloWorld .

Is this because of basic plist is different? May be use the same by default that uses qmake ?

OlivierLDff commented 4 years ago

QMake is doing of stuff under the hood for you. It's kind of hard to know everything to mimic. What is you testing emulator? iPad?

add_qt_ios_app have lot's of options, maybe i should put some as default. I think you should have a look to

I tried the example project on iphone, and it was full screen. I remember having your issue while developing this library. I'll try on my side to see which flag is required for full screen, and set it as default. I think it is nice to have a working app out of the box.

OlivierLDff commented 4 years ago

SUPPORT_IPAD was what was missing from my testing. I changed the default to Universal instead of iPhone, so default function call will work as qmake. Is it doing the trick for you? db1e2084703816249a3c89ffff24c3c2558b1dbf

davemilter commented 4 years ago

What is you testing emulator? iPad?

I just use my real iPad, no emulators.

OlivierLDff commented 4 years ago

Ok i don't have any ios stuff with because of corona, but the new default is working for me in iPad emulator. Is it working for you?

davemilter commented 4 years ago

It is working on real iPad. Full screen the same as qmake.

But Xcode gives warning during compilation:

All interface orientations must be supported unless the app requires full screen.

The code that I tried: https://github.com/davemilter/qt_ios_libs_bug

OlivierLDff commented 4 years ago

Yes this is normal since you are not putting any of those flags:

Checkout the readme of this repository to choose the one that fit your need. And i don't think of those flags should be default. It's up to the user of qt_add_ios_app to set the option he needs.

I you check you cmake log, i raise also lots of warnings about options you are not setting.

So you have 2 choices, either you set the flag in your CMakeLists.txt:

add_qt_ios_app(foo
  ORIENTATION_PORTRAIT
  ORIENTATION_PORTRAIT_UPSIDEDOWN
  ORIENTATION_LANDSCAPELEFT
# ...
)

Or you fix them by hand once xcode project is loaded.

But maybe it could be nice to set UIInterfaceOrientationPortrait as the default if user don't provide any flag. I will do that.

OlivierLDff commented 4 years ago

I consider the issue close. Feel free to reopen if more question.