Drawing bar scale with units - qml

I want to create a bar scale with units in Qt.
Is Qml has any component of the similar type that meets my above requirement?
Just for info: My QtQuick version is 1.0

Take a look at Qt Quick Colibri.
It contains a lot of QML plugins, including CLHistogram that should fit your needs.

Related

can you set a predetermined billing app qt?

can you set a vertical orientation in a qml app?
if so?
I have searched on various sites to try and solve this problem. I found it in C ++ code but I would need the piece of code in qml language
I'm using the application project - qt quick application - empty
I'm using a version of qt 5.10.1
thank you
You're looking for Screen.orientationUpdateMask.
Once the mask is set, Screen.orientation will contain the current orientation of the screen.You can read more about the Screem QML type here. Of course the orientation in this case is set by the accelerometer.
If you want to be able to go back and forth between portrait and landscape without the use of the accelerometer and while having the logic in qml you will need to use the Transform, Scale and Rotation QML types. I wouldn't recommend this approach.
One alternative to using Transform would be to use two different views all together, which might not be a good idea for maintainability especially if you want to use the 4 orientations.
If you want to force the orientation no matter what you can do it in the manifest file as you would normally without Qt.

Xamarin forms designing for multiple resolutions

How can we design according to various resolutions in Xamarin forms application. I have been using Viewbox control for Windows application but it is not found in Xamarin forms.My requirement is, if I set 50 px for a control , it should scale up or down according to various resolutions. Please provide some design guide lines to achieve this. I have been using Grid row definitions and column definitions, but for some cases I have to manually set height / width or padding for some controls. Please help me.
Xamarin.Forms does not use pixels. It uses platform specific density aware units.
Xamarin.Forms has a philosophy of using the conventions of the
underlying platforms as much as possible. In accordance with this
philosophy, the Xamarin.Forms programmer works with sizes defined by
each particular platform. All sizes that the programmer encounters
through the Xamarin.Forms API are in these platform-specific
device-independent units.
That would be "points" in iOS and "dpi" on Android.
There's a whole book chapter about it (free)
https://download.xamarin.com/developer/xamarin-forms-book/BookPreview2-Ch05-Rel0203.pdf

Color Picker for Windows store App

I want to add a color picker control to a windows store App (using VB), I came to know that there is no standard control for that. So any ideas about what could be a good purchased or open source option?
So I started building one into WinRT XAML Toolkit here but never got round to finishing it. Mainly because I figured there would need to be very different designs for different platforms. The control isn't finished, but a lot of the components that are there you could use to build a color picker that fits your design. There's a ColorExtensions class that might help you convert between HSL/HSV/RGB models, there's a FromString() method in it that can parse a color string in the formats available in XAML (e.g. "Transparent" or #FFAA0080 or #FB0) and there's a WriteableBitmapColorPickerExtensions class that you can use to render a hue ring, 2D color selector bitmap or a 1D color bar. I'll probably create some usable controls one day to use all of these primitives, but for now - you have that power! :)
I've created a simple color picker for Universal Apps, you can read about it from this blog post...

Qt 5 - QWidget in Qt Quick 2

I thought of using custom defined QWidget inherited from QTableWidget or QTableWidget directly in QML (Qt Quick 2). I tried some prototype and find it's not possible to embed QWidget in Qt Quick 2 as specified in the link Qt5. Embed QWidget object in QML.
I'm able to embed QWidget using Qt Quick 1.1 by inheriting from QDeclarativeItem but I want to achieve the same in Qt Quick 2
Do I know is there any possible way of embedding QWidget to Qt Quick 2? (May be to work by doing some workaround)
You can't easily embed QWidgets inside QtQuick2 scenes. Try instead using Qt Quick Controls (included with 5.1), which feature a TableView.

custom colors in bing maps?

I was looking at http://www.msnbc.msn.com/id/26295161/ns/weather/ and noticed that the flash map is provided by bing and have a custom color scheme. I have a similar need to show maps with a black & white colortheme, is it possible using their api or have they made custom tiles ? (doesnt seem feasible to provide tiles for alls maps on all levels :)
If you are not wedded to Bing maps, you could look into Mapbox, which provide maps based on OpenStreetMap in any style that you desire.
This question is still not answered and even if it's kind of old, I think it matters.
In fact, they're not using different tiles or a custom tile scheme. You can see those in the network inspection tool.
Since they're inside a Flash application, they can easily change the color of the image using filter on image (ColorMatrixFilter) and changing dynamically on the client side the rendered colors.
Well now some years later you can: https://msdn.microsoft.com/en-us/library/mt823636.aspx :-)
(I got here by looking for some sample styles and thought I add the link for anybody else finding this question)
Perhaps a custom tile skinner is that you need: http://rbrundritt.wordpress.com/2009/11/27/bing-maps-custom-tile-skinner/
In this example, the author changes the color of roads using ColorMatrix and ColorMap:
The two key methods used to transform the colors
consist of using ColorMatrix or a ColorMap. By
using a color matrix all the colors on the tile
can be changed within a couple lines of code. Using
a ColorMap allows you to change one color at a
time. This is useful if you only want to change a
few colors on the map.