Results 1 to 2 of 2

Thread: How to find out a MIMETYPE of anCustomWidget(QWidget)?

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows
    Thanks
    75
    Thanked 24 Times in 21 Posts

    Default How to find out a MIMETYPE of anCustomWidget(QWidget)?

    Hi
    I have two scene, which top scene has some pixmaps(by now there is only gauge but later i want use for example some graphs). every pixmap is image of a QWidget. i want to whenever user drag a pixmap into bottom scene a custom Qwidget will create there. I want to do that by mimedata but i don't know which type it is

    here is a snapshot

    Screenshot.jpg

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: How to find out a MIMETYPE of anCustomWidget(QWidget)?

    the mime type is the one you set in the QDrag object when the drag started.
    Have a look at the QDrag class documentation.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. How to find out a MIMETYPE of an image?
    By ommharidaas in forum Qt Programming
    Replies: 6
    Last Post: 15th December 2011, 22:42
  2. Identify mimetype
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2011, 06:16
  3. Cannot add new mimetype for a custom Qt Creator Plugin
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 6th February 2011, 12:52
  4. Replies: 1
    Last Post: 12th April 2010, 12:55
  5. Replies: 1
    Last Post: 2nd May 2006, 21:11

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.