Results 1 to 5 of 5

Thread: Scrollbar for lower resolution ...

  1. #1
    Join Date
    Aug 2012
    Posts
    29
    Thanked 2 Times in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Scrollbar for lower resolution ...

    Hi,

    I want a scrollbar for my application when I changes the resolution of the screen. I had tried to set the ScrollbarArea into the mainWindow, But that scrollbar appears when you resize the window of the application but it doesn't appear when I changes the resolution the system.
    any solution??

    Thanks

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Scrollbar for lower resolution ...

    When you change the screen resolution you aren't changing the size of the main window, just the percentage of the screen it occupies. The main window still occupies the same size in pixels, the pixels are just bigger (or smaller, if you make the resolution higher). So why should you expect the scrollbars to appear?

    If you want to resize your main window when the screen resolution changes, then you should connect a slot to the QDesktopWidget workAreaResized() or resized() signals. Use QApplication::desktop() to get a pointer to this widget.
    Last edited by d_stranz; 12th March 2013 at 20:01.

  3. #3
    Join Date
    Aug 2012
    Posts
    29
    Thanked 2 Times in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Scrollbar for lower resolution ...

    Hi Thanks For the answer and sorry for delay in my response.
    I have connected the QDesktopWidget workAreaResized() with my own slot where I am setting the window size and it works fine.
    But in my main window I have tab Widgets and innside that lots of contrrols.
    after setting the resolution to lower value I am not able to see all the controls inside my tab widgets, and here I want a scroll bar for showing all the controls and their value.
    when I add a Qscrollarea as my central widget for the main window and set my tabwidgets inside that scrollarea , my controls are not working. it doesn't get the focus and not allow to edit.
    any solution??

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Scrollbar for lower resolution ...

    any solution??
    We cannot help with fixing your code... we cannot see it.
    Post a minimal, complete program that demonstrates the problem you describe when you resize it. Chances are good you'll find the problem yourself while trying to do this.

  5. #5
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Scrollbar for lower resolution ...

    How about instead of adding QScrollArea as the central widget, you place the QScrollArea inside the individual tabs of the tab widget and then place your controls inside the scroll area.
    QTabWidget->individual tab -> QScrollArea -> controls.

Similar Threads

  1. Replies: 3
    Last Post: 12th October 2012, 17:23
  2. How to set lower precision only for "view"
    By lain in forum Qt Programming
    Replies: 8
    Last Post: 26th March 2012, 02:44
  3. convert upper-case to lower-case
    By RENOLD in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2012, 07:30
  4. QKeyEvent - lower case vs upper case keys?
    By ArkKup in forum Qt Programming
    Replies: 3
    Last Post: 9th January 2012, 15:58
  5. pythonqt scriptint & orting to lower version
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 0
    Last Post: 26th November 2010, 03:42

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.