×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Aug 2009
    Location
    Pisa
    Posts
    57

    How to modify Nokia's layout manager example

    Hi guys I'm stuck with a problem...
    http://wiki.forum.nokia.com/index.ph...n_layout_in_Qt
    this example from Nokia is NOT WORKING since 4.7rc1

    I have sent the bug to the bug tracking system http://bugreports.qt.nokia.com/browse/QTBUG-14058
    and you can read their solution in there...

    but I still haven't understood how to solve the bug...

    can anyone please apply the modifications to Nokia's example to make it work with qt 4.7final?
    I made some tries, but I have not succedeed so far...

    This is very important to me, please help me out if you can
    Thanks in advance...

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to modify Nokia's layout manager example

    If something is published in Forum Nokia Wiki it doesn't happens to be Nokia's example as wiki is open for everyone. Did you try to use QResizeEvent::size() instead of availableGeometry?

  3. #3
    Registered User
    Join Date
    Aug 2009
    Location
    Pisa
    Posts
    57

    Re: How to modify Nokia's layout manager example

    qt calls available geometry, not me...
    read the latest answer in the bug thread...
    that example updates the layout before the availableGeometry has been updated...

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to modify Nokia's layout manager example

    Quote Originally Posted by faenil View Post
    qt calls available geometry, not me...
    read the latest answer in the bug thread...
    that example updates the layout before the availableGeometry has been updated...
    Ok. Do you have resizeEvent() handler in the example/your application?

  5. #5
    Registered User
    Join Date
    Aug 2009
    Location
    Pisa
    Posts
    57

    Re: How to modify Nokia's layout manager example

    I do. but according to qt's devs, it's wrong to follow that approach (given in nokia's wiki example) because the availablegeometry has not been set yet when resizeevent is called...

  6. #6
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to modify Nokia's layout manager example

    Quote Originally Posted by faenil View Post
    I do. but according to qt's devs, it's wrong to follow that approach (given in nokia's wiki example) because the availablegeometry has not been set yet when resizeevent is called...
    Ok, if you have better idea than mine, go on with it. BTW, I didn't say anything about availableGeometry.

  7. #7
    Registered User
    Join Date
    Aug 2009
    Location
    Pisa
    Posts
    57

    Re: How to modify Nokia's layout manager example

    I think you didn't get me
    did you read the bug thread over at qt bug tracking website?
    The problem is I don't understand how to modifiy wiki's example code to make it work...since it's not working at the moment...
    hope it's clear now

  8. #8
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to modify Nokia's layout manager example

    Wiki example was modified.

  9. #9
    Registered User
    Join Date
    Feb 2009
    Posts
    12

    Re: How to modify Nokia's layout manager example

    hi,
    also changing from the original

    QRect qs=QApplication::desktop()->availableGeometry();

    to

    QRect qs=QApplication::desktop()->screenGeometry();

    works for me for both, Qt 4.6.3 and Qt 4.7.
    Anyway, the approach as implemented now by Daniil in the Wiki pages and Wiki Code Example is certainly more future proven and clean as general solution.
    Juergen

  10. #10
    Registered User
    Join Date
    Aug 2009
    Location
    Pisa
    Posts
    57

    Re: How to modify Nokia's layout manager example

    how did u modify it? qt devs told me I have to wait for 4.7.1 to make it work...
    it can't be working now with 4,7 since workAreaResized is bugged...
    Last edited by faenil; 2010-10-04 at 23:14.

  11. #11
    Registered User
    Join Date
    Aug 2009
    Location
    Pisa
    Posts
    57

    Re: How to modify Nokia's layout manager example

    your modifications do not solve the problem divanov
    the right layout is applied now, but the problem still remains, if turn phone to landscape and then to portrait, and I open a menu, it goes up as if it was in landscape mode, and if I turn the phone again into landscape and open the menu, it goes down (it thinks to be in portrait) going out of screen...

    please help me if there's anything we can do about this before 4.7.1

  12. #12
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to modify Nokia's layout manager example

    You didn't tell anything about menu before.

  13. #13
    Registered User
    Join Date
    Nov 2009
    Posts
    15

    Re: How to modify Nokia's layout manager example

    The example in the wiki is not working for me. It seems that resize event is not handled, for unknown reasons. The example code displays the four button only in landscape (Simulator + devices, current Nokia Qt SDK), no matter what I try. What can possibly be wrong?

    I used the old PLLayout class with success, and am now running an adapted version that reads the size from the event, not from the window geometry. This works fine, although I would also like to use the code in the wiki, as it seems to handle things more convenient.

    Thanks!
    Peter
    Peter
    ***********************************************************
    Das deutschsprache Forum für mobile Qt-Entwickler:
    http://mobileqt.de
    ***********************************************************

  14. #14
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to modify Nokia's layout manager example

    Did you try to debug it? The most promising place is ProxyLayout::eventFilter().

  15. #15
    Registered User
    Join Date
    Nov 2009
    Posts
    15

    Re: How to modify Nokia's layout manager example

    Debugging was a good idea: actually "layoutSquare" was activated in Landscape mode, it seems to be closer to ratio of the main window. This seems to be the expected behaviour, although I was confused because of the screenshots on the wiki page with the code example (it shows the landscape layout that will never be activated). If I remove the square layout it switches between layout and portrait, as expected. Thanks!
    Peter
    ***********************************************************
    Das deutschsprache Forum für mobile Qt-Entwickler:
    http://mobileqt.de
    ***********************************************************

Similar Threads

  1. Delete Nokia's signatures, extract files, modify the package and sign it again
    By elviin in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 5
    Last Post: 2010-02-25, 14:40
  2. Layout Manager or SizeChanged() ?
    By Daneel in forum Symbian User Interface
    Replies: 4
    Last Post: 2009-11-29, 22:46
  3. S60 3rd FP2: race condition in layout manager?
    By schoenke in forum Mobile Java General
    Replies: 2
    Last Post: 2009-08-31, 20:40
  4. Problem in nokia's sms example and in my app
    By Ikhtys in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2007-08-16, 14:17
  5. Can't install Nokia's example to real device
    By afka in forum Mobile Java General
    Replies: 3
    Last Post: 2007-04-30, 17:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •