If i drag on my widged a local file in to qtextedit on mac & window the file is open
but on linux kde no ... Why?

result display ....
file:///home/username/Desktop/mone.xml
and not display file inside xml??

kubuntu 6.0.6 uname 2.6.15


Qt Code:
  1. void Gui_Main::dragEnterEvent(QDragEnterEvent *event)
  2. {
  3. qDebug() << "### mousePressEvent " ;
  4. event->acceptProposedAction();
  5. }
  6. void Gui_Main::dropEvent(QDropEvent *event)
  7. {
  8. if(event && event->mimeData()) {
  9. Grabdata(event->mimeData());
  10. }
  11. }
  12. void Gui_Main::Grabdata(const QMimeData *data)
  13. {
  14. if (!data) {
  15. return;
  16. }
  17. QList<QUrl> urlelist;
  18. if (data->hasUrls()) {
  19. urlelist = data->urls();
  20. for ( int i = 0; i < urlelist.size(); ++i ) {
  21. QString unfilone = urlelist.at(i).toLocalFile();
  22. qDebug() << "### url " << unfilone;
  23. if (is_file(unfilone)) {
  24. if (unfilone.endsWith(".fo")) {
  25. OpenOtherResult(unfilone);
  26. } else if (unfilone.endsWith(".xml")) {
  27. LoadXmlFile(unfilone);
  28. } else if (unfilone.endsWith(".xsl")) {
  29. LoadXsltFile(unfilone);
  30. }
  31. }
  32. }
  33. }
  34. }
To copy to clipboard, switch view to plain text mode 
all code on http://visual-xsltproc.svn.sourcefor...o_Debug_qt4.2/