Results 1 to 5 of 5

Thread: Buttony issues :)

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

    Exclamation Buttony issues :)

    -I have put a pixmap on a button and have set it to be flat - setFlat(true);
    The flat button seems "transparent" on the widget background, but when you press it it sinks in and the entire rectangular background is visible for the time duration of the click. I wish to disable this .i.e it should appear that only the button Icon has sunk in. How can I do this?

    I tried setting the setAutoFillBackground(false) but it didn't help.

    -when i see my application in Window Maker window manager, the buttons when selected get a frame drawn around them....can i do something about this?

    -How do i set the default properties for all the buttons that i create in the class?

    Thanks.

    Nupul

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 27 Times in 27 Posts

    Default Re: Buttony issues :)

    Quote Originally Posted by nupul
    -I have put a pixmap on a button and have set it to be flat - setFlat(true);
    The flat button seems "transparent" on the widget background, but when you press it it sinks in and the entire rectangular background is visible for the time duration of the click. I wish to disable this .i.e it should appear that only the button Icon has sunk in. How can I do this?
    Qt Code:
    1. button->setMask(pixmap->createHeuristicMask());
    To copy to clipboard, switch view to plain text mode 
    a life without programming is like an empty bottle

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

    Wink Re: Buttony issues :)

    Thanks zlatko....that's one down 2 to go...

    nupul

  4. #4
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 27 Times in 27 Posts

    Default Re: Buttony issues :)

    Quote Originally Posted by nupul
    -How do i set the default properties for all the buttons that i create in the class?
    Maiby its will be funny for you but I see one way - subclass QButton ans set for it all needed as default properties. Add then use this QYourButton classs instead QPushButton
    a life without programming is like an empty bottle

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

    Talking Re: Buttony issues :)

    Quote Originally Posted by zlatko
    Maiby its will be funny for you but I see one way - subclass QButton ans set for it all needed as default properties. Add then use this QYourButton classs instead QPushButton
    No, i don't find it funny! It is a solution - a cute one indeed, but there must be someother way too...jacek/jpn/wysota/CBM could point out . I could now say, 2 down....1 to go!!

    Thanks zlatko

    Nupul

Similar Threads

  1. Popup notification window issues on Mac
    By alexandersv in forum Qt Programming
    Replies: 2
    Last Post: 20th April 2012, 12:15
  2. QSqlDatabase connectivity issues
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2008, 13:58
  3. Using QGraphicsView as a Splash Screen (repaint issues)
    By chezifresh in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 22:22
  4. Speed, transparency, and drop issues with QGraphicsView
    By jefferai in forum Qt Programming
    Replies: 16
    Last Post: 30th June 2007, 17:14
  5. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 14:45

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.