Results 1 to 3 of 3

Thread: QPushButton mng files

  1. #1
    Join Date
    Jul 2011
    Posts
    31
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3
    Platforms
    MacOS X

    Default QPushButton mng files

    Hi guys, first post here, I looked around and couldn't find the answer to my question:

    I am trying to create an independent widget in Qt designer in which I need to have the function of a QPushbutton that can play/stop an .mng file embedded in it.

    I know that only Qlabel can do that so I was wondering if there was any way to do this in Qt Designer.

    I tried making the QPushButton transparent and just put a label with the movie in a label in the background but when I try to use a layout so it can autoexpand and fit as required the QPushButton and QLabel are separated.
    I know this isnt the right way to do it but it was a try. Could you point me in the right direction as to how to do this using QPushButton

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QPushButton mng files

    QStackedLayout is a ideal candidate for your use, add QLabel and QPushButton to QStackedLayout and use
    Qt Code:
    1. QStackedLayout::setStackingMode(QStackedLayout::StackAll)
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jul 2011
    Posts
    31
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Re: QPushButton mng files

    thank you santosh, i used something similar to this, i used stackedwidget in the qt designer ...

Similar Threads

  1. Replies: 0
    Last Post: 22nd February 2010, 09:30
  2. Replies: 12
    Last Post: 17th June 2009, 05:34
  3. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  4. how to save sequences of text files and sound files
    By nagpalma in forum Qt Programming
    Replies: 8
    Last Post: 3rd July 2007, 00:06
  5. Replies: 3
    Last Post: 26th September 2006, 12:16

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.