Results 1 to 10 of 10

Thread: QMovie as the background of a QDialog?

  1. #1
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QMovie as the background of a QDialog?

    Hi,

    How can I have a QMovie as the background of a QDialog?

    Many thanks,
    Carlos.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Put a QLabel on a QDialog.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Hi,

    Yes I can use a qlabel to show the movie. But I need to have some other widgets on top of the movie in a layout. If I have a QLabel and I set the QDialog to a Vertical Layout the movie will not be under the other widgets.

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Did you try to put layout on QLabel?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    No did not try that... but how can I put a layout on a QLabel? Would it be like enable QLabel to contain other widgets? I don't know how to do that.

  6. #6
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Yes, QLabel may have child widgets and a layout to lay them out like any other widget. This is no different from adding children to a QDialog, a QGroupBox, etc.

  7. #7
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Hi,

    That sound promising. Can I do that with QT creator or just pragmatically?

    Many thanks,
    Carlos

  8. #8
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Yes, you can.
    Don't afraid to try anything by yourself.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  9. #9
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    I may sound very silly but I can't drag and drop a widget for example a QPushButton in a QLabel in the same way I drop a QPushButton in a QGroupBox. The groupbox contains the QPushButton however the QLabel does not! Do I need to change anything in the QLabel widget?

    I am using QT Creator 2.3.1

    Many thanks.

  10. #10
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMovie as the background of a QDialog?

    Take my words back: unfortunately you can't do this in Qt Designer(Qt Creator). You can only do this in the code.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  11. The following user says thank you to spirit for this useful post:

    qlands (28th August 2012)

Similar Threads

  1. QMovie GIF with MAC
    By Viraj Bhatt in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2012, 15:22
  2. Problem: QDialog change background when move the mouse
    By Gerard in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 21st October 2011, 11:25
  3. Replies: 0
    Last Post: 7th October 2010, 15:52
  4. Customize QDialog's background using a SVG image
    By danielperaza in forum Qt Programming
    Replies: 0
    Last Post: 7th April 2010, 21:39
  5. QDialog w/ transparent background
    By LarryDobson in forum Qt Programming
    Replies: 6
    Last Post: 26th September 2006, 19:26

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.