Results 1 to 2 of 2

Thread: How does resizing work in QWidgets in general and QGraphicsView in particular?

  1. #1
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default How does resizing work in QWidgets in general and QGraphicsView in particular?

    I've looked through the QT documentation and there doesn't seem to be a set size () function for QWidgets as I imagine there would be. Where the auto layout looks decent, it's annoying being unable to specify the exact size of existing QWidgets. Say I created a pixmap and want to toggle between viewing its actual size in pixels and a zoomed view in a QGraphicsView. What is the best way to resize a QGraphicsView (filling the layout and being a fixed size according to the pixmap dimensions)?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How does resizing work in QWidgets in general and QGraphicsView in particular?

    There are QWidget::resize() and QWidget::setGeometry(), but having sizes layout controlled is almost always better.

    Cheers,
    _

Similar Threads

  1. General advice about scaling on QGraphicsView/QGraphicsScene
    By onurozcelik in forum Qt Programming
    Replies: 0
    Last Post: 24th May 2010, 09:14
  2. Replies: 3
    Last Post: 2nd March 2010, 21:58
  3. NLE Editor using QWidgets/QGraphicsView
    By depsch in forum Newbie
    Replies: 0
    Last Post: 15th September 2009, 00:07
  4. QGraphicsView general questions
    By sincnarf in forum Qt Programming
    Replies: 5
    Last Post: 16th October 2007, 00:22
  5. work general with plugins
    By raphaelf in forum Installation and Deployment
    Replies: 14
    Last Post: 17th February 2006, 15:30

Tags for this Thread

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.