How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc)
-
Hello,
In for example a web page some user created content can be a text with markdown, images at different places, gifs, smilies, embed and render a youtube player via links or link previews etc, but learning GUI development I do not understand how this is done in a native app? Is this only possible with web view?
Thanks for your time and help
-
@escape said in How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc):
Is this only possible with web view?
A web browser is a native application, so your premise is a bit confusing.
If you want to show web content specifically, then you'll need to use something that can show web content like a WebView. If you want to show something arbitrary based on user input, then that just describes most applications. A picture viewer will show whatever image a user wants to open. A word processor will show whatever content a user types. A paint program will show whatever content a user draws, etc. A web browser isn't fundamentally any different from something like a word processor. The program displays stuff on screen based on data it has loaded.
@escape said in How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc):
Is it normal to use a local html file in webengine and connect to python/c++ via webchannel to make a hybrid app? To fetch data from an api/server and displaying it in the app?
People who are really used to web dev sometimes like to use HTML for making UI. Personally, I just find it confusing and overly complicated to add HTML and webs tuff to an application that doesn't need it because my background isn't mainly web stuff. But it's certainly not terribly unusual.
-
Hi,
Web development still follows a given architecture usually based on html + JavaScript + CSS or something that converts from e.g. Markdown back to html.
Native applications use building blocks like buttons, list views, combo boxes, etc. down to the fully self painted widget.
What exactly are you looking for ?
-
@SGaist For example I know how to create a listview with a box to put a image in and perhaps a username beside it and then some text published by that user under it, but all this is static? What if that text has varying number of images and all that? In a car instrument panel the only thing that changes is the data? Just as examples to explain what I mean. I know very little about Qt or desktop development in general.
-
Then you should check the model view concept.
-
-
@escape said in How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc):
Is this only possible with web view?
A web browser is a native application, so your premise is a bit confusing.
If you want to show web content specifically, then you'll need to use something that can show web content like a WebView. If you want to show something arbitrary based on user input, then that just describes most applications. A picture viewer will show whatever image a user wants to open. A word processor will show whatever content a user types. A paint program will show whatever content a user draws, etc. A web browser isn't fundamentally any different from something like a word processor. The program displays stuff on screen based on data it has loaded.
@escape said in How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc):
Is it normal to use a local html file in webengine and connect to python/c++ via webchannel to make a hybrid app? To fetch data from an api/server and displaying it in the app?
People who are really used to web dev sometimes like to use HTML for making UI. Personally, I just find it confusing and overly complicated to add HTML and webs tuff to an application that doesn't need it because my background isn't mainly web stuff. But it's certainly not terribly unusual.