I have new problem couldnt find any solution in Google ...
im using a qml file and it contain a surface3d , when i show it with a obj file that was in qt examples (oilrig) it could show correct without any problems!
but when i used my own obj file (boat) it couldnt show correct in surface3d application (showing with grid Triangles, not like a volume ...)
in blender(a program for editing 3d models) my boat and oilrig has correct views but in surface3d just oilrig is true!
i tested 100 items more that downloaded from internet but cant work , just oilrig that was from qt examples was true
can any one help me????
ok i found a Temporary solution that was usefull for me.
1- convert that model in blender to ".dae"
2- upload it in scene editor online
3-convert it to Model (from NULL)
4-export as .obj file and use it in QT ^_^
Related
I've tried loading a local html file using webkit_web_view_load_uri() with a file:// URL. However, the webview would display a blank page. To circumvent this, I tried using webkit_web_view_load_html() and it worked correctly.
Now that I'm trying to load some images in the html using the <img> tag, the images aren't loaded (It displays a blank page).
I'm puzzled because I tried before (~ 2 months ago) a similar method and it worked.
Note: I copied the contents of the generated HTML into a file and loaded it with Firefox and it worked as it should (The images are visible), but with another WebKitGtk application I had lying around the images didn't load.
Note: I'm using C++ as the main programming language (I'd prefer having C++ types in the solutions only if possible)
Note: I have set webkit_settings_set_allow_file_access_from_file_urls() and webkit_settings_set_allow_universal_access_from_file_urls() to TRUE
Ok, I've managed to solve this. The solution had NOTHING to do with webkitgtk, which is strange. It seems that the application was trying to download the page instead of loading it. This traces to a faulty MIME type database.
Tl;Dr:
Execute this:
rm ~/.local/share/mime/packages/user-extension-html.xml
update-mime-database ~/.local/share/mime
and use webkit_web_view_load_uri() instead of webkit_web_view_load_html() with a file:// URI
I had the same problem in C. You have to explicitly set file:// as base_uri when you call webkit_web_view_load_html().
See also answer here
a newbe here.
I'm writing an essay in Rmarkdown and I want to render a PDF. When I try to import an excel sheet with the commands:
dat1 <- read.xlsx("Seminararbeit.xlsx", 2L)
and then create a table with stargazer, I keep on getting this Error:
Error in basename(filePath) :
unable to translate 'my-file-path-goes-here' to native encoding
It looks like the table is actually created with stargazer, but it doesn't show up when I knit the file. I tried to Reinstall R and Rstudio (I believe I have the newest version of both) but nothing worked. Is the file path too long? I have a MacOS, is that the problem?
Please help, it's driving me nuts!
I use Aspose.Cells for java to convert excel documents to html. But there is problem with umlauts.
there is the code I use to save excel documents to html
com.aspose.cells.Workbook workbook = new com.aspose.cells.Workbook(stream);
workbook.save(path, com.aspose.cells.SaveFormat.HTML);
is there some way to resolve this?
This type of issues might occur due to missing fonts. Since Aspose.Cells needs the underlying fonts (used in the workbook) to be installed on the system for rendering to PDF, HTML or image, so you got to make sure all the underlying fonts are there on the pc and your application should access to that folder. You can also find the needed fonts for your workbook using Workbook.getFonts() method. You may put all the font files (.ttf files) in some folder and set the fonts directory at the start before using your original code.
e.g
Sample code:
......
String MyFontDir = "your_fonts_folder_path";
// Setting the fonts folder with setFontFolder method
FontConfigs.setFontFolder(MyFontDir, true);
//.......
//Your code goes here.
//......
I am working as Support developer/ Evangelist at Aspose.
I am trying to get the icon of an app (doesn't matter which one). I noticed Qt doesn't have something like GDesktopAppInfo and therefore I tried getting it through QSettings from /usr/share/applications/appname.desktop. That's already a problem, because the desktop file might not be there. Anyway, going further to extract the Icon key. Now I dunno how to find the url (notice that I need the url, sure I could make a QIcon, but I need to export it to QML, which would mean another QQuickImageProvider class, anyway, I don't wanna go that way). Is it possible, or is the aforementioned QQuickImageProvider my only solution?
Here is a little guide that might help you find your way. Keep one thing in mind: start with the basic case, get code running and extend it to more difficult cases later.
For now, lets assume the following:
.desktop file is in /usr/share/applications
App icon is in SVG or PNG format
App icon path is absolute
App name is lower case and does not contain whitespace
Input: App name "git-cola"
Read /usr/share/applications/git-cola.desktop
Use a QRegularExpression to get the Icon value
You get an absolute iconPath, e.g. /usr/share/git-cola/icons/git.svg
Have an invokable C++ function that exposes a QUrl to QML
In QML, set the source property of an Image to getIconUrl("Target App")
where 4. looks something like
QUrl MyClass::getIconUrl(QString appName)
{
// get iconPath from appName
return QUrl::fromLocalFile(iconPath);
}
If things are running, you can add support for
Multiple .desktop locations (there might be a handful or so)
Add support for relative paths
Add support for XPM files
You can use QIcon::fromTheme(QString iconName) to find the icon. It works most of the time but it's not as reliable as gtk
I want to change UIAnnotationView image on mapkit in rubymotion language.
Any one know this, kindly help me.
How about a complete working example? I just tested it :)
A budy and I converted a LOT of iOS code from the iOS Cookbook to RubyMotion
There's a whole chapter on Maps, but the one that looks to answer your question best is this:
https://github.com/IconoclastLabs/rubymotion_cookbook/tree/master/ch_6/06_custompins
It's just like colored pins, but your main difference will be this
pinImage = UIImage.imageNamed("ilpin.png")
annotationView.image = pinImage
Goodluck! - Gant from Iconoclast Labs
I think you mean, an MKAnnotationView? If so, you just need to set the image property to a new UIImage. See this Gist:
https://gist.github.com/3049611
Based on the RubyMotionSamples Beer project - https://github.com/HipByte/RubyMotionSamples/blob/master/Beers/app/beer_map_controller.rb
I have added a new image file called 'signpost.png' under 'resources', and altered the code from using a pin to using a straight up annotation, with the new custom image.
The following code works fine to change the UIAnnotationView's image
view = MKAnnotationView.alloc.initWithAnnotation(annotation, reuseIdentifier:ViewIdentifier)
view.image = UIImage.imageNamed("ptr.jpg")
view.canShowCallout = true
I have saved the image ptr.jpg in resources folder.