Results 1 to 2 of 2

Thread: QPushButton dynamic size

  1. #1
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QPushButton dynamic size

    Hi all,

    I'm currently developing a button layout designer, that is, the user can resize, move the buttons using the mouse like in Qt Designer then save it. I'm doing this so the user can customize the buttons without rebuilding the project.

    I can now move the buttons in different positions using the drag events. But my problem now is on how to re size the buttons using the mouse like in Qt Designer?

    thanks...

  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: QPushButton dynamic size

    Install an event filter to intercept mouse events coming to the buttons and react on them to perform resizing.
    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.


Similar Threads

  1. QDockWidget - dynamic size
    By ttvo in forum Qt Programming
    Replies: 3
    Last Post: 12th June 2009, 07:07
  2. size of QPushButton
    By eleanor in forum Qt Programming
    Replies: 3
    Last Post: 4th May 2009, 17:21
  3. QPixmap in QPushButton size problem
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 22nd January 2008, 12:50
  4. QDialog dynamic size.
    By hickscorp in forum Qt Programming
    Replies: 6
    Last Post: 27th April 2007, 00:34
  5. Difficult:Dynamic Icon size change?!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 10th April 2006, 09:39

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.