Results 1 to 9 of 9

Thread: How to get screen resize event?

  1. #1
    Join Date
    May 2009
    Posts
    9
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default How to get screen resize event?

    Hi,

    I am trying to get resize event of screen using QDesktopWidget::resized() signals, but not able to get events. Then how can i get notification when screen size is changed?

    I am using Qt for S60, 4.5 garden release.

    Thanks,
    kamlesh

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to get screen resize event?

    Can we see your code? Note that S60 support is still in beta, not everything might work.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to get screen resize event?

    Quote Originally Posted by kamlesh.sangani View Post
    Hi,

    I am trying to get resize event of screen using QDesktopWidget::resized() signals, but not able to get events. Then how can i get notification when screen size is changed?

    I am using Qt for S60, 4.5 garden release.

    Thanks,
    kamlesh
    btw, i dont remember when i resized my Nokia phone screen. Do tell me how did u do it.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to get screen resize event?

    Quote Originally Posted by MrDeath View Post
    btw, i dont remember when i resized my Nokia phone screen. Do tell me how did u do it.
    You can switch it from vertical to horizontal mode.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to get screen resize event?

    Quote Originally Posted by wysota View Post
    You can switch it from vertical to horizontal mode.
    well then there must be S60 specific api for it. I dont remember exactly but when i was working on QtWinCE, on Windows Mobile 5, i got the orientation from the windows api. may be he should look into orientation kinda stuff
    Last edited by nish; 7th June 2009 at 11:50.

  6. #6
    Join Date
    May 2009
    Posts
    9
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: How to get screen resize event?

    Thanks to all for taking interest in my thread.

    Quote Originally Posted by MrDeath View Post
    btw, i dont remember when i resized my Nokia phone screen. Do tell me how did u do it.
    Basically screen size will be changed when user change mode from portrait to landscape or vice-versa. For example, Nokia N95 has resolution 240x320 in portrait mode but if user change it to landscape mode than resolution will be 320x240.

    Quote Originally Posted by wysota
    Can we see your code? Note that S60 support is still in beta, not everything might work.
    I resolved that issue. Actually QWidget::resizeEvent() is get called on mode change. Now its working fine for me.

    Again thanks to all.

    kamlesh

  7. The following user says thank you to kamlesh.sangani for this useful post:

    abk883 (9th March 2010)

  8. #7
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: How to get screen resize event?

    Hey Kamlesh.. i am facing some problem regarding use of resizeevent()

    could you put in some sample code which you use to resize on receiving this event

  9. #8
    Join Date
    Mar 2010
    Posts
    68
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: How to get screen resize event?

    Qt Code:
    1. void YourWidgetname::resizeEvent(QResizeEvent *event)
    2. {
    3. //Add your code here
    4. QWidget::resizeEvent(event);
    5. }
    To copy to clipboard, switch view to plain text mode 

  10. #9
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: How to get screen resize event?

    Thanks Kevin

    i was also using the same way as you mentioned ..but when I debug ...no event gets generated on changing Portrait to Landscape mode ....

    Do we also need to set this Resize Event on some widget .....

Similar Threads

  1. Replies: 4
    Last Post: 19th February 2009, 12:10
  2. Resize event on stretch?
    By kodiak in forum Qt Programming
    Replies: 2
    Last Post: 3rd November 2008, 23:51
  3. Qt event queue overloading?
    By gct in forum Qt Programming
    Replies: 3
    Last Post: 17th March 2008, 19:39
  4. Resize event
    By boss_bhat in forum Qt Programming
    Replies: 5
    Last Post: 19th July 2006, 16:43
  5. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 01:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.