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.
Related
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.
How I can implement packed bubble graph in WinRT. I am trying to achieve graph similar to attached image..
I tried for a similar implementation / sample for silverlight / Windows 8 in google, But didn't get any. Please anyone help me to achieve the same graph. My main issue is with implementing the logic correctly.
What kind of project are you using? There's actually a way to do this in each kind of supported project.
For javascript you can use the Canvas element, which has easy 2D api's for drawing circles and text.
In C++ you can use the DirectX 2D api's to draw circles. In C# you can embed a DirectX panel into your xaml and then use DirectX to draw the circles.
In C# or C++ you can also solve this problem with just xaml, using a ListView with Canvas for an ItemsPanel, and Circle objects. Here is a blog post I found with a tutorial (except with rectangles):
http://zamjad.wordpress.com/2010/03/17/using-canvas-as-a-itempanel-template-in-listbox/
Not sure if this fits your need. If you are not averse to using JS + HTML in WinRT, d3.js should be very very useful
Example of packed bubble chart - http://bl.ocks.org/mbostock/4063269
http://d3js.org/
Hope this helps!
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...
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.
I have implemented crop functionality but
Is it possible to selection crop image like below link
http://deepliquid.com/projects/Jcrop/demos.php?demo=advanced
Short answer, not really unless you do some clever coding and view aligning / transforming.
Long answer, you have two options:
Create your own custom module with XCode, OBJ-C etc.
Just nest the Jcrop code in your own webview inside titanium. (This seems easiest).