Results 1 to 6 of 6

Thread: Set the image at the center in QLabel?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    27

    Question Re: Set the image at the center in QLabel?

    Thanks for reply.

    Actually I have tried this but nothing changes.The image is still not in the center of the dialog.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Set the image at the center in QLabel?

    Use QScrollArea::setAlignment(). And use a layout to place the scrollarea into the dialog instead of hardcoding its geometry.
    J-P Nurmi

  3. #3
    Join Date
    Dec 2006
    Posts
    211
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    27

    Question Re: Set the image at the center in QLabel?

    Thanks for reply.

    But I m using Qt 4.1.5 and it does not have that property for QScrollArea.

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

    Default Re: Set the image at the center in QLabel?

    Call setWidgetResizable(true) on the scroll area.

  5. The following user says thank you to wysota for this useful post:

    vishal.chauhan (21st August 2007)

Similar Threads

  1. Explanation to Image Formats
    By sincnarf in forum Qt Programming
    Replies: 13
    Last Post: 6th July 2007, 17:02
  2. Help needed handling image data
    By toratora in forum General Programming
    Replies: 2
    Last Post: 11th May 2007, 09:24
  3. how i can add image in my toolbar
    By jyoti in forum Qt Tools
    Replies: 7
    Last Post: 19th December 2006, 14:39
  4. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36
  5. Question about updating an image on screen
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 19:01

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
  •  
Qt is a trademark of The Qt Company.