문제

I would like to restrict my application to portrait orientation. I was able to it in Qt 4.7.3 but was unable use the same code for Qt 4.6.3. Is there any way to setOreintation in Qt 4.6.3

도움이 되었습니까?

해결책

You can use Symbian specific code to meet your requirement. Add the following code in your Main.cpp file:

// Symbian specific code
    #ifdef Q_OS_SYMBIAN
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAPD(error, 
    if (appUi) {
        // Lock application orientation into Portrait
        appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
    }
    );
    #endif

Also the following LIBS in your pro file:

LIBS += -lcone -leikcore -lavkon

Refer this LINK for more details.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top