Results 1 to 3 of 3

Thread: Changing properties of pushbutton?

  1. #1
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Changing properties of pushbutton?

    i have i program that dynamically create pushbutton. It will be inserted to a gridlayout wherein my gridlayout is inserted to a groupbox.

    when im intializing the size of pushbutton
    Qt Code:
    1. pushbutton->setGeometry(QRect(n, n, n, n));
    To copy to clipboard, switch view to plain text mode 
    and put in a gridlayout, i think it ignores it.

    how can i change the size of my buttons?

    then i add a border image to my button
    Qt Code:
    1. pushbutton->setStyleSheet("border-image: url(:/background/myimage.png);");
    To copy to clipboard, switch view to plain text mode 
    but it became flat button plus the effects of button were gone.

    how can i add images to my button without removing it effects?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing properties of pushbutton?

    Quote Originally Posted by triperzonak View Post
    ... and put in a gridlayout, i think it ignores it.

    how can i change the size of my buttons?
    If you put a widget in a layout, the layout controls its size. You can influence the size by changing size policies.

  3. #3
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing properties of pushbutton?

    Quote Originally Posted by jacek View Post
    If you put a widget in a layout, the layout controls its size. You can influence the size by changing size policies.
    i see.. tnx

Similar Threads

  1. Problem with setFont for a PushButton
    By arunvv in forum Newbie
    Replies: 12
    Last Post: 7th April 2008, 23:35
  2. connecting image to a pushbutton
    By sudheer in forum Qt Tools
    Replies: 2
    Last Post: 4th December 2007, 09:23

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.