Validate top level domain in Qt6 - c++

The obsolete Qt5 QUrl::topLevelDomain was a nice, straight forward way to validate top level domains in Qt. It has been deprecated withough a replacement from 5.12 on afaik. How can we validate top level domains in Qt6?

Related

It is possible to just use QT and WebAssembly (instead of HTML + CSS + JavaScript) to develop a front-end web?

I am a C++ programmer, but for some reason, I have to develop a website by myself(My own commercial project). I don't want to take a lot of time to study JavaScript and something else. It is possible to just use QT and WebAssembly (instead of HTML + CSS + JavaScript) to develop a front-end web?
Yes, it's absolutely possible and I'm currently doing it for a project but you should do it carefully based on the project requirements, running environment and your own backgrounds.
Here are some problems you may encounter:
The output .wasm file may get too large. Generally, it won't be suitable for public domain applications.
In low-end devices, maybe you find it laggy if you don't do enough code level optimizations.
Threads are not officially supported yet (as of Dec. 2019) by major browsers but tech-preview is available. This is not a real big problem as it would be a standard feature soon.
Native virtual keyboard won't work on mobile devices but the work is in progress.
These were my own major problems with Qt for WebAssembly.
Despite this, I find it much more flexible than HTML+CSS. QML is really a nice language for UI development. Creating animated UIs is quite easy and straight-forward.
You can also use many JavaScript libraries in your QML code like Lodash and Moment or any other js library that does not refer or manipulate window DOM.
Yes, it is possible. But you should do not do it if only reason is reject for learning new technologies.
For now (I'am writing this answer when Qt 5.14 is present) Qt for webassembly is deployed as official platform. Unfortunately it is young platform support with a lot of problems and possible future changes. Qt team do really good job so next version will be better. 5.14 is much better than 5.13 in webassembly context but still need fixes.
You should know Qt for webassembly will support only a few Qt modules, excluding widget. Yes, you can only use QML for GUI.
Qt for webassembly was created for the purpose of port one code base in other platform (it it generally Qt develop way, please see Qt for MCU). With other technologies in this stack like QRemoteObject is very interesting technologies. It was not created for websites in normal network. Main Qt for webassembly target are internal network systems and remote control of devices. Pay attention about this.
Unfortunately, not all browser will support webassembly right. Please see Qt for weassembly support notes.
Additional, in Qt you can't find build-in rest-API handle or other standard web technologies to integrate with your existing backed.

opencart create new module with order

I am new to opencart and want to create new extension module. After order placed and payment process completed after that I need to call 3rd party API.
So, Is there any hooks (like WordPress or Prestashop) that I can apply and use into my module files?
I am currently using opencart version - 2.3.0.2
OpenCart doesn't have any hooks, only events system, which is pretty weak. Instead it uses VQMod. This is a pretty powerful tool for developers, who know some PHP. It works similar to WordPress hooks, but gives you unlimited options.
Hooks use certain points in the code or fire certain events, but with VQMod you can put your code literally anywhere. You only need to find the desired line and put your code before or after it, even replace it, if necessary.
If you're familiar with WP hooks and filters, I'm pretty sure you'll handle VQMod well.
There are three following way :
Opencart Events
Vqmod
Ocmod
PS: I prefer to use ocmod.

It is possible to hide the Discovery menu?

Since version 4 the discovery is standard on dspace structure unlike previous versions they had to be activated. It is possible to disable it or hide it? with any configuration without having to modify code or xslt files.
If the goal is to completely disable Discovery, then I think you can do it by following those two steps.
Fist in config/dspace.cfg, you should change the event system configuration: replace
event.dispatcher.default.consumers = versioning, discovery, eperson, harvester
by
event.dispatcher.default.consumers = versioning, search, browse, eperson, harvester
Then, in config/xmlui.xconf, you should enable the old Lucene search aspect (look for the Search Engines section in the document).
A full Lucene re-index will be necessary.
Not tested personally, this should work on DSpace 4 and 5 XMLUI, however.
Cheers,
Benoît

OS X Yosemite Spotlight extensions

Is it possible to extend spotlight's search feature to support additional commands?
For example, is it possible to define custom web search aliases, meaning I could type yt and it would provide results from youtube.
Alternatively, is it possible to add additional system commands were I could type sl (or some variant) to put my computer to sleep.
In the meantime there is Flashlight (The missing plugin system for Spotlight) http://flashlight.nateparrott.com/
This is expandable with Python scripts.
UPDATE Oct 2016 It seems that Flashlight is not longer maintained. The last update was more then a year ago. Check the repo here: https://github.com/nate-parrott/Flashlight
UPDATE Mar 2017 There is a fork which is still maintained: github.com/w0lfschild/Flashlight – Thanks #amoebe
No it is not possible, there are only 4 types of extensions for OS X Yosemite:
Today - Get a quick update or perform a quick task in the Today view of Notification Center
Share - Post to a sharing website or share content with others
Action - Manipulate or view content within the context of another app
Finder - Present information about file sync states directly in Finder.
All of these extension types are explicitly activated by the user for functionality. Apple has said that they are just getting started with extensions and plan to add more in the future, so logically it seems that Spotlight extensions are next (goodbye Alfred :sadface:).
I have an alternate solution for you which I am currently using. It's native to the OS and does not require disabling System Integrity Protection in order to install Flashlight.
Using Automator to create a new Service. Then with Ask For Text node you can display a popup similar to spotlight. From there the possibility are numerous. For web search there is a command like Display Webpages. The top activate AppleScript command is for gaining focus of the following popup.
You can construct the URL from your input text using JavaScript node. You can parse "yt" to YouTube search url for example and put the rest after the space to the URL.
Then in Preference you can set this new service as a shortcut for easier access.

How to create desktop application using fully customized UI?

Have a look at this figure below, which is a Quick Book Enterprise Solution 2014
Judging by its interface (not its DLL), I don't think you can easily guess with what platform/language does the above application was created. Qt? .NET? Java? It has its own border, custom menu, ... etc. In a simple wording, "it has totally customized UI that make it stand from the rest".
What do we need to be able to create this kind of application with fully customized UI? And what if I add cross platform aspect in this application? Different customized widgets in different OSes... but maintaining the same level of UI appearance...
I have previous experience with Qt, .. but I am not sure Qt can do this.. or is it?
For instance, you can write your own plugin similar to the existing qt style plugins.
Here, you can find an example how to write widget based style plugins with Qt 5:
QtWidgets 5.0: Style Plugin Example
You would work with the QStylePlugin plugin interface.
If you are looking into a bit more modern solution, you may find this qml style and theme support documentation useful.