Results 1 to 5 of 5

Thread: Difficult:Dynamic Icon size change?!?

Hybrid View

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

    Default Re: Difficult:Dynamic Icon size change?!?

    Quote Originally Posted by nupul
    w.r.t what? I've put forth 3 problems!
    We're giving hints here, not producing free solutions for every problem. You should first try to do something on your own and then if you have particular problems, ask for help. And we are very strict about it when it comes to academic projects like yours.

    ummm, I knew this is the answer, but I wanted to know how to do it
    But you didn't ask how to modify icon size when the container size changes, you just stated what final behaviour you want to have.

    You're probably using QListView so I guess you should reimplement QListView::iconSize() or use QListView::setIconSize() from within resizeEvent (or resize() method reimplementation).

    didn't know this, thanks for the pointer...but can i do so without actually displaying a scrollbar, but buttons, as i mentioned...I'd appreciate if you can help me with some code snippet rather than plain text...it'll help me understand better!
    I don't think a snippet is needed here Use QAbstractScrollArea::scrollContentsBy() from within a slot connected to the clicked() signal of those buttons. The only problem is implementing buttons themselves If you want to place them on the inside of the view, you can't use layouts but rather use setGeometry() from resizeEvent to move them to appropriate places. When they are to be outside, layouts should be fine, but you waste some space. Of course you have to make sure the scroll bar is hidden.

  2. #2
    Join Date
    Mar 2006
    Posts
    172
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default Re: Difficult:Dynamic Icon size change?!?

    Quote Originally Posted by wysota
    We're giving hints here, not producing free solutions for every problem. You should first try to do something on your own and then if you have particular problems, ask for help. And we are very strict about it when it comes to academic projects like yours.
    This particular doubt is not concerned with my project. I had seen an app do this once and was just curious if the same could be achieved in Qt! As for trying to do this on my own is concerned....i just didn't know what to try and use to try a solution

    Thanks!

    Nupul

Similar Threads

  1. How to change Icon size in QMenu?
    By alex chpenst in forum Qt Programming
    Replies: 4
    Last Post: 3rd September 2008, 14:16
  2. Replies: 1
    Last Post: 2nd August 2008, 15:46
  3. Replies: 2
    Last Post: 21st May 2007, 21:12
  4. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 19:16
  5. tool bar icon size looking small???
    By darpan in forum Qt Tools
    Replies: 7
    Last Post: 31st March 2006, 16:38

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.