Results 1 to 4 of 4

Thread: Setting buttons on top...

  1. #1
    Join Date
    Oct 2010
    Posts
    13
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Setting buttons on top...

    Hi All,

    Sorry if this doubt seems to be silly in this forum.

    I am a newbie to Qt. I have developed one application wherein a frame comes sliding from the left on click of a button. Currently this frame obscures the button i pressed. I dont want this to happen. I want this button to be in front of the frame. Pls let me know how to do this.

    Regards,
    Siva

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Setting buttons on top...

    Just set the final position of the moving frame away from the button.
    Or make the button child of frame after animation is done.

  3. #3
    Join Date
    Oct 2010
    Posts
    13
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Setting buttons on top... Re: Aamer

    Hi Aamer,

    I already have implemented the first appraoch. But the frame comes sliding over the button and lands at the end of the button making it visible. But i want the frame to silde from below the button.

    For the second approach, i did some reading and came to know that, we have to select any one layout from the 3 available and add the button to the frame using that layout (To make it child of the frame). But these Layouts doesn't offer me the freedom to place the button exactly where in want. I tried setGeometry after setting the Layout which was not working.

    Pls giv me sme suggestions and a code snippet as example.

    Regards,
    Siva

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Setting buttons on top... Re: Aamer

    Try using windowstaysontop hint for the frame.
    Am not sure if there's anything like Z value for widgets..

    If you use graphics view framework... you can achieve what you want easily.

Similar Threads

  1. Buttons
    By valy12 in forum Qt Programming
    Replies: 8
    Last Post: 19th April 2010, 12:16
  2. odd shaped buttons
    By jimiq in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 19:50
  3. Programatically setting radio buttons
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 25th May 2007, 20:55
  4. Bitmap buttons
    By BloodHo in forum Newbie
    Replies: 1
    Last Post: 4th November 2006, 14:17
  5. Several buttons
    By Mariane in forum Newbie
    Replies: 4
    Last Post: 15th March 2006, 20:50

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.