Results 1 to 10 of 10

Thread: Dropsite demo not working in QtDemo

  1. #1
    Join Date
    Mar 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Red face Dropsite demo not working in QtDemo

    I'm trying to get the Dropsite (drag and drop) demo to work in QtDemo but when I drag an image into the field, a generic image is shown. I am using Qt 4.6 on Windows 7. Please help. Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dropsite demo not working in QtDemo

    What do you mean by "a generic image"? Where do you drag the image from?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dropsite demo not working in QtDemo

    I should have said icon. In this case it is a icon image that has been stretched out. I have tried dragging an image from my computer and from the internet. Here is what it looks like:

    Last edited by aarunt1; 4th March 2010 at 10:26.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dropsite demo not working in QtDemo

    It's not an image, it's a file. If you drag an icon from a file manager, you are dragging the file, not the image inside it. If you want to drag an image, open the image in an application that supports it (like a web browser) and start dragging it (the image, not the url) from there.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dropsite demo not working in QtDemo

    I tried that already. This is always the result. I have tried dragging an image from my browser and this is what I get. I have tried dragging an image file to it and I get the same thing. I have tried it on different machines with the same result. Did you try it?

    Also, when I was using Qt 4.5 this WORKED. I could drag from a file and it WORKED. I could drag from my browser and it WORKED. So why does it not work in 4.6? What you are saying is that it is detecting it as a file correct? I only need to drag and drop images into this field. Is there a way to make it so it will only take in image files?


    EDIT: I have edited the code and even though I have omitted it detecting anything put images it STILL detects it as a file. How do you get it to detect images!? Please try this example out. Thanks
    Last edited by aarunt1; 4th March 2010 at 12:36.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dropsite demo not working in QtDemo

    Quote Originally Posted by aarunt1 View Post
    I tried that already. This is always the result. I have tried dragging an image from my browser and this is what I get. I have tried dragging an image file to it and I get the same thing. I have tried it on different machines with the same result. Did you try it?
    Yes but not on Windows.

    What you are saying is that it is detecting it as a file correct?
    Yes, it seems so - text/uri-list is a regular mime for files. But if you drag the image from your webbrowser, you shouldn't get a text/uri-list.
    How do you get it to detect images!?
    I open an image in Firefox, I press LMB on the image and start dragging it, then I hover the mouse over the dropsite window, wait a bit and the image is detected. Dropping the drag or not is irrelevant.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Mar 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dropsite demo not working in QtDemo

    thanks for the reply. I believe Windows must be the case. What OS are you running? I had tried to get it running on Ubuntu Linux but could not get it configured correctly. I have not tried it on OSX but that is where I eventually want the project to run. Perhaps I can try this on Windows XP.

    What is weird is that I had my friend, who is also running Windows 7, run the pre-compiled Dropsite demo from the qt\examples\draganddrop\dropsite\release folder. He was able to drag and drop files from either his hard drive or from a browser and they both worked fine. But then he opened the dropsite.pro in QtCreator and recompiled it. When he tried to run it again it did exactly what is happening to me. Why would it be that it ran fine but then upon recompile it does not work correctly? Is it some kind of build issue with Qt and Windows 7? Please let me know. Thanks!

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dropsite demo not working in QtDemo

    Quote Originally Posted by aarunt1 View Post
    thanks for the reply. I believe Windows must be the case. What OS are you running?
    Linux/KDE.

    Why would it be that it ran fine but then upon recompile it does not work correctly?
    Maybe the prebuilt binary was compiled with a different version of Qt than the one your friend used during compilation?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Mar 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dropsite demo not working in QtDemo

    Perhaps it could be a different version of Qt, but I tried all kinds of different versions on my Windows 7 64-bit machine and it doesn't even detect the drag at all. It just stays completely blank. I need to find an XP machine but currently can't. I will try to install different versions of Qt on my Windows 7 32-bit machine and see if that works, if not I will see if I can install XP on it and hopefully that works.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dropsite demo not working in QtDemo

    You can check if there are any bug reports on this on Qt bug tracker.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. qtdemo question
    By link in forum Qt Programming
    Replies: 4
    Last Post: 24th February 2009, 17:04
  2. qtdemo.exe display problem with Qt 4.4.0
    By Dwarf007 in forum Installation and Deployment
    Replies: 5
    Last Post: 4th June 2008, 05:27
  3. qtdemo 4.4 looks like this on my machine!
    By magland in forum General Discussion
    Replies: 1
    Last Post: 25th May 2008, 07:55
  4. qtdemo doesn't exist...
    By xyzt in forum Newbie
    Replies: 2
    Last Post: 24th March 2008, 05:37
  5. source code for qtdemo
    By babu198649 in forum Newbie
    Replies: 3
    Last Post: 24th December 2007, 12:59

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.