[Interest] QQuickRenderControl example not working on Desktop OSX (Qt 5.4 Alpha)

2014-10-16 Thread Roberto Garrido Martín
Hi all,
We have our OpenGL ES 2.0 based renderer. Until now, we were integrating it
into our Qt app by using a QML Item/Node configuration, but the new
rendercontrol API in Qt 5.4 Alpha seems to be a more flexible solution, and
the proper way to integrate.

I’m running the rendercontrol example distributed with the 5.4 Alpha, and I
can only see a white rotating cube, but the QML scene of the app is
supposed to be rendered on each of the sides of the cube.

I have used the OpenGL profiler, and there is one texture created, but with
no contents on it.

I’m using Mac OSX 10.9.5.

Any ideas?

Here a screenshot:
https://dl.dropboxusercontent.com/u/6132766/rendercontrolAPI_resized.jpg


Thanks,
Robert.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Apps crashing with ios8

2014-10-16 Thread Gustavsen Richard
?Do you have a stack trace?


-Richard



Fra: interest-bounces+richard.gustavsen=theqtcompany@qt-project.org 
 på vegne 
av Christophe Thomas 
Sendt: 15. oktober 2014 21:57
Til: interest@qt-project.org
Emne: [Interest] Apps crashing with ios8

Hello,

Now that I can build again my app for ios8 it is crashing:

=> the app was fully working on ios7.1

=> it seems to crash on first call of QApplication::processEvents() or on first 
display of a dialog.

=> before crash I can display some kind of splash screen + custom QMessagebox 
(ie using ios callback instead of qt one).

I'm using QT5.3.2,q make -v gives:
QMake version 3.0
Using Qt version 5.3.2 in /Users/thomas/Qt/5.3/ios/lib

Thx,

Chris
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QQuickRenderControl example not working on Desktop OSX (Qt 5.4 Alpha)

2014-10-16 Thread Agocs Laszlo
Hi,

We are not aware of any issues on OS X. The example worked pretty well on the 
OS X 10.9 machines I tried.

If the problem is consistent, please create a bug report with more information 
about the hardware.
Best regards,
Laszlo


From: interest-bounces+laszlo.agocs=theqtcompany@qt-project.org 
[mailto:interest-bounces+laszlo.agocs=theqtcompany@qt-project.org] On 
Behalf Of Roberto Garrido Martín
Sent: 16. oktober 2014 09:46
To: interest@qt-project.org
Subject: [Interest] QQuickRenderControl example not working on Desktop OSX (Qt 
5.4 Alpha)

Hi all,
We have our OpenGL ES 2.0 based renderer. Until now, we were integrating it 
into our Qt app by using a QML Item/Node configuration, but the new 
rendercontrol API in Qt 5.4 Alpha seems to be a more flexible solution, and the 
proper way to integrate.

I’m running the rendercontrol example distributed with the 5.4 Alpha, and I can 
only see a white rotating cube, but the QML scene of the app is supposed to be 
rendered on each of the sides of the cube.

I have used the OpenGL profiler, and there is one texture created, but with no 
contents on it.

I’m using Mac OSX 10.9.5.

Any ideas?

Here a screenshot: 
https://dl.dropboxusercontent.com/u/6132766/rendercontrolAPI_resized.jpg


Thanks,
Robert.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Dropping data in a Item View class

2014-10-16 Thread Etienne Sandré-Chardonnal
Dear all,

I cannot manage to enable dropping data into an Item View class.

Basically:
 - The model is a custom QAbstractItemView subclass, having a tree
structure. Column 1 is editable
 - The view is a standard QTreeView


I would like to drop data from another widget in the editable field (column
1 indices). I have somewhere else in the app a custom widget that accepts
the drop correctly using reimplemented dragEnterEvent and dropEvent, so the
dragging is likely to be set up correctly.

What I did on the view:
 - treeView->setAcceptDrops(true);
 - treeView->setDragDropMode(QAbstractItemView::DropOnly);
 - treeView->setDefaultDropAction(Qt::CopyAction);
 - treeView->setDragDropOverwriteMode(true);
 - treeView->setDropIndicatorShown(true);

What I did on the model:
 - In the reimplemented flags(), I return for column 1 : Qt::ItemIsEditable
| Qt::ItemIsDropEnabled | Qt::ItemIsEnabled | Qt::ItemIsSelectable.
 - I reimplemented setData, editing works.
 - I reimplemented dropMimeData. The mime type is "application/x-ocxml" but
this function is likely not in cause since the drag cursor never shows an
allowed drop
 - I reimplemented supportedDropActions, it returns Qt::CopyAction


Then, the drag cursor never turns to the "drop allowed" indicator, and
dropping always fails.
I tried reimplementing mimeTypes to return
QStringList("application/x-ocxml") but then the app crashes upon dragging.

Any idea how to implement this?

Thanks!

Etienne
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QQuickRenderControl example not working on Desktop OSX (Qt 5.4 Alpha)

2014-10-16 Thread Gunnar Sletta

On 16 Oct 2014, at 09:45, Roberto Garrido Martín 
 wrote:

> Hi all,
> We have our OpenGL ES 2.0 based renderer. Until now, we were integrating it 
> into our Qt app by using a QML Item/Node configuration, but the new 
> rendercontrol API in Qt 5.4 Alpha seems to be a more flexible solution, and 
> the proper way to integrate.

Be aware of that if you use the rendercontrol API you will be on a single 
thread and will miss out on the parallelization that the threaded render loop 
has, including the render thread animations.

The best point of integration for a native GL renderer will in most cases be to 
use QQuickWindow::beforeRendering() and render into the GL context of the 
window.

cheers,
Gunnar

> 
> I’m running the rendercontrol example distributed with the 5.4 Alpha, and I 
> can only see a white rotating cube, but the QML scene of the app is supposed 
> to be rendered on each of the sides of the cube.
> 
> I have used the OpenGL profiler, and there is one texture created, but with 
> no contents on it.
> 
> I’m using Mac OSX 10.9.5.
> 
> Any ideas?
> 
> Here a screenshot: 
> https://dl.dropboxusercontent.com/u/6132766/rendercontrolAPI_resized.jpg
> 
> 
> Thanks,
> Robert.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Dropping data in a Item View class

2014-10-16 Thread Etienne Sandré-Chardonnal
I just found out the issue. Implementing mimeTypes() was the solution (the
documentation for this function is quite obscure IMHO), but the
dragEnterEvent of the view was then calling flags() on the model with an
invalid index (col=row=-1, null pointer) which I did not properly handled
in flags() subclass.

Another question then : does View classes handle right mouse button
drag&drop? Normally, if several drop actions are possible, the usual
behavior is to popup a context menu with the possible actions (Copy, Move,
...) but it seems that even by adding several actions and dragging with
right mouse button does not trigger any menu. Is this implemented in View
Widgets?

Thanks,

Etienne



2014-10-16 10:46 GMT+02:00 Etienne Sandré-Chardonnal :

> Dear all,
>
> I cannot manage to enable dropping data into an Item View class.
>
> Basically:
>  - The model is a custom QAbstractItemView subclass, having a tree
> structure. Column 1 is editable
>  - The view is a standard QTreeView
>
>
> I would like to drop data from another widget in the editable field
> (column 1 indices). I have somewhere else in the app a custom widget that
> accepts the drop correctly using reimplemented dragEnterEvent and
> dropEvent, so the dragging is likely to be set up correctly.
>
> What I did on the view:
>  - treeView->setAcceptDrops(true);
>  - treeView->setDragDropMode(QAbstractItemView::DropOnly);
>  - treeView->setDefaultDropAction(Qt::CopyAction);
>  - treeView->setDragDropOverwriteMode(true);
>  - treeView->setDropIndicatorShown(true);
>
> What I did on the model:
>  - In the reimplemented flags(), I return for column 1 :
> Qt::ItemIsEditable | Qt::ItemIsDropEnabled | Qt::ItemIsEnabled |
> Qt::ItemIsSelectable.
>  - I reimplemented setData, editing works.
>  - I reimplemented dropMimeData. The mime type is "application/x-ocxml"
> but this function is likely not in cause since the drag cursor never shows
> an allowed drop
>  - I reimplemented supportedDropActions, it returns Qt::CopyAction
>
>
> Then, the drag cursor never turns to the "drop allowed" indicator, and
> dropping always fails.
> I tried reimplementing mimeTypes to return
> QStringList("application/x-ocxml") but then the app crashes upon dragging.
>
> Any idea how to implement this?
>
> Thanks!
>
> Etienne
>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QQuickRenderControl example not working on Desktop OSX (Qt 5.4 Alpha)

2014-10-16 Thread Roberto Garrido Martín
On 16 October 2014 11:16, Gunnar Sletta  wrote:

>
> On 16 Oct 2014, at 09:45, Roberto Garrido Martín <
> robertogarridomar...@gmail.com> wrote:
>
> > Hi all,
> > We have our OpenGL ES 2.0 based renderer. Until now, we were integrating
> it into our Qt app by using a QML Item/Node configuration, but the new
> rendercontrol API in Qt 5.4 Alpha seems to be a more flexible solution, and
> the proper way to integrate.
>
> Be aware of that if you use the rendercontrol API you will be on a single
> thread and will miss out on the parallelization that the threaded render
> loop has, including the render thread animations.
>
> The best point of integration for a native GL renderer will in most cases
> be to use QQuickWindow::beforeRendering() and render into the GL context of
> the window.
>
>

Thanks for the input.
If we do it that way, we will still be able to render our GL scene on the
background while the QML scene will be rendered on top of it?

Cheers,
Robert.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] HLS Streaming in Qt?

2014-10-16 Thread Eckerle Andreas
Dear all,

I would like to make an app for iOS and android featuring a HLS stream.

Does Qt support HLS streaming maybe using a QML component?
Especially on Android HLS support seems to be limited with Android versions 
below 4.4 so just opening a webView and using HTML5 video object will probably 
not work with many devices running with android 4.1 -4.3

Does maybe someone knows a link to an example of how to do HLS streaming with 
Qt?

Thanks and best regards,
Andreas

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] X86 64 bit Qt5.4 Alpha build error

2014-10-16 Thread Ramakanthreddy Kesireddy
Hi,

I installed all the X11 packages and build the latest Qt5.4 Alpha on Ubuntu 
14.04 desktop 64 bit machine.
It gives the below error when I did make.



g++ -Wl,--no-undefined -Wl,-O1 -fuse-ld=gold -shared -o libqxcb.so 
.obj/qxcbclipboard.o .obj/qxcbconnection.o .obj/qxcbintegration.o 
.obj/qxcbkeyboard.o .obj/qxcbmime.o .obj/qxcbdrag.o .obj/qxcbscreen.o 
.obj/qxcbwindow.o .obj/qxcbbackingstore.o .obj/qxcbwmsupport.o .obj/qxcbmain.o 
.obj/qxcbnativeinterface.o .obj/qxcbcursor.o .obj/qxcbimage.o 
.obj/qxcbxsettings.o .obj/qxcbsystemtraytracker.o .obj/qxcbconnection_xi2.o 
.obj/qglxintegration.o .obj/atom.o .obj/xkb-compat.o .obj/context.o 
.obj/xkb-keymap.o .obj/keysym.o .obj/keysym-utf.o .obj/state.o .obj/text.o 
.obj/context-priv.o .obj/keymap-priv.o .obj/utils.o .obj/utf8.o .obj/action.o 
.obj/ast-build.o .obj/compat.o .obj/expr.o .obj/include.o .obj/keycodes.o 
.obj/keymap-dump.o .obj/keymap.o .obj/keywords.o .obj/rules.o .obj/scanner.o 
.obj/symbols.o .obj/types.o .obj/vmod.o .obj/xkbcomp.o .obj/parser.o 
.obj/util.o .obj/x11-keymap.o .obj/x11-state.o .obj/moc_qxcbconnection.o 
.obj/moc_qxcbmime.o .obj/moc_qxcbnativeinterface.o 
.obj/moc_qxcbsystemtraytracker.o  -lX11-xcb -lXi -ldl -ldbus-1 -lxcb 
-L/home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/src/plugins/platforms/xcb/xcb-static
 -lxcb-static -L/home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/lib 
-lQt5PlatformSupport -lfontconfig -lfreetype -lXrender -lXext -lX11 -lm -ludev 
-lmtdev -lQt5Gui -lQt5DBus -lQt5Core -lGL -lpthread
mv -f libqxcb.so ../../../../plugins/platforms/
make[6]: Leaving directory 
`/home/ramakanth/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/src/plugins/platforms/xcb'
make[5]: Leaving directory `/home/ ramakanth 
/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/src/plugins/platforms/xcb'
make[4]: Leaving directory `/home/ ramakanth 
/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/src/plugins/platforms'
make[3]: Leaving directory `/home/ ramakanth 
/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/src/plugins'
make[2]: *** [sub-plugins-make_first] Error 2
make[2]: Leaving directory `/home/ ramakanth 
/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/ ramakanth 
/qt-everywhere-opensource-src-5.4.0-alpha/qtbase'
make: *** [module-qtbase-make_first] Error 2
Please let me know if am missing any X11 libraries though I installed all 
libraries from Qt for http://qt-project.org/doc/qt-5/linux-requirements.html

Thanks and Regards,
Ramakanth






Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html externally 
http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QQuickRenderControl example not working on Desktop OSX (Qt 5.4 Alpha)

2014-10-16 Thread Gunnar Sletta

On 16 Oct 2014, at 11:46, Roberto Garrido Martín 
 wrote:

> 
> 
> On 16 October 2014 11:16, Gunnar Sletta  wrote:
> 
> On 16 Oct 2014, at 09:45, Roberto Garrido Martín 
>  wrote:
> 
> > Hi all,
> > We have our OpenGL ES 2.0 based renderer. Until now, we were integrating it 
> > into our Qt app by using a QML Item/Node configuration, but the new 
> > rendercontrol API in Qt 5.4 Alpha seems to be a more flexible solution, and 
> > the proper way to integrate.
> 
> Be aware of that if you use the rendercontrol API you will be on a single 
> thread and will miss out on the parallelization that the threaded render loop 
> has, including the render thread animations.
> 
> The best point of integration for a native GL renderer will in most cases be 
> to use QQuickWindow::beforeRendering() and render into the GL context of the 
> window.
> 
> 
> 
> Thanks for the input.
> If we do it that way, we will still be able to render our GL scene on the 
> background while the QML scene will be rendered on top of it?

Indeed you will :) See the OpenGL under QML example: 
http://qt-project.org/doc/qt-5/qtquick-scenegraph-openglunderqml-example.html 

> 
> Cheers,
> Robert. 

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] X86 64 bit Qt5.4 Alpha build error

2014-10-16 Thread Koehne Kai


> -Original Message-
> From: interest-bounces+kai.koehne=theqtcompany@qt-project.org
> [mailto:interest-bounces+kai.koehne=theqtcompany@qt-project.org]
> On Behalf Of Ramakanthreddy Kesireddy
> Sent: Thursday, October 16, 2014 12:24 PM
> To: interest@qt-project.org
> Subject: [Interest] X86 64 bit Qt5.4 Alpha build error
> 
> Hi,
> 
> 
> 
> I installed all the X11 packages and build the latest Qt5.4 Alpha on Ubuntu
> 14.04 desktop 64 bit machine.
> 
> It gives the below error when I did make.

The real error is not included in your snippet. It almost certainly was printed 
before the part you copied.

It often helps to run make -j1 , so that the actual build errors show up right 
before make exits.
 
Regards

Kai


> 
> 
> 
> 
> g++ -Wl,--no-undefined -Wl,-O1 -fuse-ld=gold -shared -o libqxcb.so
> .obj/qxcbclipboard.o .obj/qxcbconnection.o .obj/qxcbintegration.o
> .obj/qxcbkeyboard.o .obj/qxcbmime.o .obj/qxcbdrag.o .obj/qxcbscreen.o
> .obj/qxcbwindow.o .obj/qxcbbackingstore.o .obj/qxcbwmsupport.o
> .obj/qxcbmain.o .obj/qxcbnativeinterface.o .obj/qxcbcursor.o
> .obj/qxcbimage.o .obj/qxcbxsettings.o .obj/qxcbsystemtraytracker.o
> .obj/qxcbconnection_xi2.o .obj/qglxintegration.o .obj/atom.o .obj/xkb-
> compat.o .obj/context.o .obj/xkb-keymap.o .obj/keysym.o .obj/keysym-
> utf.o .obj/state.o .obj/text.o .obj/context-priv.o .obj/keymap-priv.o
> .obj/utils.o .obj/utf8.o .obj/action.o .obj/ast-build.o .obj/compat.o
> .obj/expr.o .obj/include.o .obj/keycodes.o .obj/keymap-dump.o
> .obj/keymap.o .obj/keywords.o .obj/rules.o .obj/scanner.o .obj/symbols.o
> .obj/types.o .obj/vmod.o .obj/xkbcomp.o .obj/parser.o .obj/util.o .obj/x11-
> keymap.o .obj/x11-state.o .obj/moc_qxcbconnection.o
> .obj/moc_qxcbmime.o .obj/moc_qxcbnativeinterface.o
> .obj/moc_qxcbsystemtraytracker.o  -lX11-xcb -lXi -ldl -ldbus-1 -lxcb -
> L/home/sona/qt-everywhere-opensource-src-5.4.0-
> alpha/qtbase/src/plugins/platforms/xcb/xcb-static -lxcb-static -
> L/home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtbase/lib -
> lQt5PlatformSupport -lfontconfig -lfreetype -lXrender -lXext -lX11 -lm -ludev
> -lmtdev -lQt5Gui -lQt5DBus -lQt5Core -lGL -lpthread
> mv -f libqxcb.so ../../../../plugins/platforms/
> make[6]: Leaving directory `/home/ramakanth/qt-everywhere-opensource-
> src-5.4.0-alpha/qtbase/src/plugins/platforms/xcb'
> make[5]: Leaving directory `/home/ ramakanth /qt-everywhere-
> opensource-src-5.4.0-alpha/qtbase/src/plugins/platforms/xcb'
> make[4]: Leaving directory `/home/ ramakanth /qt-everywhere-
> opensource-src-5.4.0-alpha/qtbase/src/plugins/platforms'
> make[3]: Leaving directory `/home/ ramakanth /qt-everywhere-
> opensource-src-5.4.0-alpha/qtbase/src/plugins'
> make[2]: *** [sub-plugins-make_first] Error 2
> make[2]: Leaving directory `/home/ ramakanth /qt-everywhere-
> opensource-src-5.4.0-alpha/qtbase/src'
> make[1]: *** [sub-src-make_first] Error 2
> make[1]: Leaving directory `/home/ ramakanth /qt-everywhere-
> opensource-src-5.4.0-alpha/qtbase'
> make: *** [module-qtbase-make_first] Error 2
> 
> Please let me know if am missing any X11 libraries though I installed all
> libraries from Qt for http://qt-project.org/doc/qt-5/linux-requirements.html
> 
> 
> 
> Thanks and Regards,
> 
> Ramakanth
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ==
> ==
> 
> Disclaimer: This message and the information contained herein is proprietary
> and confidential and subject to the Tech Mahindra policy statement, you may
> review the policy at http://www.techmahindra.com/Disclaimer.html
> externally http://tim.techmahindra.com/tim/disclaimer.html internally
> within TechMahindra.
> ==
> ==
> 
> 

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Avoiding binding loop

2014-10-16 Thread Nuno Santos
Hi,

I’m trying to make a menu that grows below the selected item to show its 
contents. The code below is a part of the ListView delegate. 

The problem is that I want to make the contentContainer height equal to the 
content height, but I always end up with a binding loop. 

Rectangle {
   id: contentContainer
   anchors.top: item.bottom
   width: parent.width
   height: 0

   states: [
   State {
   when: root.currentIndex==index
   PropertyChanges {
   target: contentContainer;
   height: content.height
   }
   }
   ]

   transitions: [
   Transition {
   PropertyAnimation { properties: "height"; duration: 50 }
   }
   ]

   Loader {
   id: content
   width: parent.width
   }
}

Can anyone give me a suggestion on how to solve this problem?

Regards,

Nuno Santos
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] How to set QtQuickControls Slider to an initial value without modifying the current saved?

2014-10-16 Thread Nuno Santos
Hi,

I’m using Slider from QtQuickControls and i’m facing a problem. I initialise 
the value with a value saved on settings. However, when the slider is 
instantiated, it is triggering onValueChanged with the default min value. The 
setting is being correctly saved because I don’t show the slider right away. 
Only when the slider is show, this is happening and I see the result of the 
change in settings. 

Slider {
width: parent.width
height: 10
minimumValue: 60
maximumValue: 180
stepSize: 1
updateValueWhileDragging: true
value: settings.trackWidth
onValueChanged: {
console.log("track width value changed: " + value)
settings.trackWidth = value
}
Component.onCompleted: {
console.log("track width on completed: " + settings.trackWidth)
value = settings.trackWidth
}
}

Console:

qml: track width value changed: 60
qml: track width on completed: 60

Any ideas?

Regards,

Nuno

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] HLS Streaming in Qt?

2014-10-16 Thread Mandeep Sandhu
Qt, natively does not support HLS. It'll depend on the backend that
QtMultimedia uses on a particular platform.

So check if the iOS backend supports (which it ideally should as HLS is
from Apple too). I haven't played with QtMultimedia in a while so I'm not
sure if juts passing an m3u8 url will work out of the box.

HTH,
-mandeep


On Thu, Oct 16, 2014 at 3:17 AM, Eckerle Andreas  wrote:

>  Dear all,
>
>
>
> I would like to make an app for iOS and android featuring a HLS stream.
>
>
>
> Does Qt support HLS streaming maybe using a QML component?
>
> Especially on Android HLS support seems to be limited with Android
> versions below 4.4 so just opening a webView and using HTML5 video object
> will probably not work with many devices running with android 4.1 -4.3
>
>
>
> Does maybe someone knows a link to an example of how to do HLS streaming
> with Qt?
>
>
>
> Thanks and best regards,
>
> Andreas
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Apps crashing with ios8

2014-10-16 Thread Christophe Thomas
Hello,

How can I get this ?

In attached file the console log

Chris

2014-10-16 9:54 GMT+02:00 Gustavsen Richard <
richard.gustav...@theqtcompany.com>:

>  ​Do you have a stack trace?
>
>
>  -Richard
>
>
>  --
> *Fra:* interest-bounces+richard.gustavsen=theqtcompany@qt-project.org
>  på
> vegne av Christophe Thomas 
> *Sendt:* 15. oktober 2014 21:57
> *Til:* interest@qt-project.org
> *Emne:* [Interest] Apps crashing with ios8
>
> Hello,
>
>  Now that I can build again my app for ios8 it is crashing:
>
>  => the app was fully working on ios7.1
>
>  => it seems to crash on first call of QApplication::processEvents() or on
> first display of a dialog.
>
>  => before crash I can display some kind of splash screen + custom
> QMessagebox (ie using ios callback instead of qt one).
>
>  I'm using QT5.3.2,q make -v gives:
> QMake version 3.0
> Using Qt version 5.3.2 in /Users/thomas/Qt/5.3/ios/lib
>
>  Thx,
>
>  Chris
>


trace.rtf
Description: RTF file
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QQuickGrabItemResult on iOS

2014-10-16 Thread Brian Dentino
Has anyone had any success using QQuickItem::grabToImage on iOS? I'm using it 
successfully on OSX and android, and it works perfectly fine in the iOS 
simulator (iOS 7 and 8), but when I run on an iOS device, the images come up 
empty. I've tried on both an iPad 2 and an iPhone 5s (both running iOS 8), but 
I don't have access to any devices with iOS 7.

Any advice on how to root-cause this?

Thanks,
Brian
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] 3D Navigation QtLocation Module

2014-10-16 Thread Ramakanthreddy Kesireddy
Hi,

Is it possible to implement 3D Navigation using Qt Location Module in Qt5.4 
Beta?

Thanks and Regards,
Ramakanth






Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html externally 
http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Buiding lib on ios 8

2014-10-16 Thread Tor Arne Vestbø
What's the output of xcode-select ?

Do you have .qmake.cache or .qmake.stash files in your build dir?

tor arne

On 14/10/14 21:48, Christophe Thomas wrote:
> Hello,
>
> I'm trying to build a working app for ios 8. It used to build on Ios 7.1.
>
> - I've done the update of xcode to move to new version and add support
> for ios8
> - I'm using Qt 5.3.2: output of qmake -v gives:
> QMake version 3.0
> Using Qt version 5.3.2 in /Users/thomas/Qt/5.3/ios/lib
> - I've cleaned my sources from all Makefile, pro.user or cache from qmake
>
> I'm trying to build bzlib as a static lib in order to be included in the
> main program. pro file is:
>
> DESTDIR=../build
> TEMPLATE=lib
> TARGET=bz2
> CONFIG+=staticlib
> DEPENDPATH += .
> INCLUDEPATH += .
>
> # Input
> HEADERS += bzlib.h \
> bzlib_private.h
>
> SOURCES += blocksort.c \
> huffman.c \
> bzlib.c \
> compress.c \
> crctable.c \
> decompress.c \
> randtable.c
>
> When doing qmake in the bzip folder, I get a Makefile + Makefile.device
> and Makefile.Simulator, there is no xcode project file.
>
> Running make ends immediatly with an error because iPhoneOS7.1.sdk is
> not found which is true as I only have 8.0 installed.
>
> With the same installation and procedure, I've tryed building the main
> app, after qmake I get several Makefile + xcode project file.
>
> Make is running ok til link phase as it can't find the static libs I'l
> trying to build.
>
> thx
>
> Chris
>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt::MakePointer for creating QPointer as std::make_shared for creating std::shared_ptr

2014-10-16 Thread Mikhail Matrosov
Hello!

In modern C++ there is almost no need to use raw *new* and *delete*. As
Bjarne Stroustrup is saying in his “A Tour of C++”: “Avoid ‘‘naked’’ new
and delete operations; §4.2.2.”. We use standard containers and smart
pointers for that, with std::make_shared and std::make_unique functions for
smart pointers creation.

In Qt we also have QSharedPointer and QSharedPointer::create(…) method.
But we don’t use smart pointers in Qt much, due to parent-driven memory
model. And most of QObjects are created with raw *new* operations. Maybe it
is a proper thing to add some C++14-style wrapper for creating QObjects
like this:


   1. namespace Qt 
   2. {
   3.   template
   4.   QPointer  MakePointer(
   Args&&... args)
   5.   {
   6. T* pObject = new T(std::forward(args)...);
   7. Q_ASSERT(pObject->parent() != nullptr);
   8. return pObject;
   9.   }
   10. }

Now, one can safely call Qt::MakePointer to create a QObject and be sure it
will not leak due to an assertion for an existing parent. And it will free
all the calling code from raw *new*operations. One can always use raw
*delete* to destroy the object, but he does not have to. And even if he
will, it will not lead to dangling pointers problem since QPointer is
automatically set to null in this case.

I’m planning to use this approach in my code. Do you think it is relevant?
Are there any drawbacks?

PS This is a cross-post of my question from Qt forums:
http://qt-project.org/forums/viewthread/48541, where SGaist
 suggested me to post here.

-
Best regards, Mikhail Matrosov
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt::MakePointer for creating QPointer as std::make_shared for creating std::shared_ptr

2014-10-16 Thread Reinhardt Behm
On Thursday 16 October 2014 01:56:46 Mikhail Matrosov wrote:
> Hello!
> 
> In modern C++ there is almost no need to use raw *new* and *delete*. As
> Bjarne Stroustrup is saying in his “A Tour of C++”: “Avoid ‘‘naked’’ new
> and delete operations; §4.2.2.”. We use standard containers and smart
> pointers for that, with std::make_shared and std::make_unique functions for
> smart pointers creation.
> 
> In Qt we also have QSharedPointer and QSharedPointer::create(…) method.
> But we don’t use smart pointers in Qt much, due to parent-driven memory
> model. And most of QObjects are created with raw *new* operations. Maybe it
> is a proper thing to add some C++14-style wrapper for creating QObjects
> like this:
> 
> 
>1. namespace Qt 
>2. {
>3.   template
>4.   QPointer  MakePointer(
>Args&&... args)
>5.   {
>6. T* pObject = new T(std::forward(args)...);
>7. Q_ASSERT(pObject->parent() != nullptr);
>8. return pObject;
>9.   }
>10. }
> 
> Now, one can safely call Qt::MakePointer to create a QObject and be sure it
> will not leak due to an assertion for an existing parent. And it will free
> all the calling code from raw *new*operations. One can always use raw
> *delete* to destroy the object, but he does not have to. And even if he
> will, it will not lead to dangling pointers problem since QPointer is
> automatically set to null in this case.
> 
> I’m planning to use this approach in my code. Do you think it is relevant?
> Are there any drawbacks?
> 
> PS This is a cross-post of my question from Qt forums:
> http://qt-project.org/forums/viewthread/48541, where SGaist
>  suggested me to post here.
> 

This looks to me like a complicated solution to a non existing problem.

Your method will fail for objects that should not have a parent, e.g top level 
windows or objects that are created to be moved to anther thread to name just 
a few.
In all other cases where you do not want an object to be an orphan (no parent) 
just don't give a default for the usual parent parameter in the constructor 
and check it inside the constructor for parent being non-null. This way an 
ASSERT will give a meaningful message.

In most cases when I need an QObject without parent I create it on the stack 
(no explicit new/delete) because it is just a local variable and the compiler 
take care of creation and destruction. 
Others are created with new and directly have a parent or widgets are placed 
into layouts and get a parent this way.

Just because Bjarne Stroustrup has said it, does not mean it make sense in 
this context and has to be blindly followed even if it make code more complex. 
He also said to write _clear_code_. And this takes precedence, at least for 
me.

-- 
Best Regards

Reinhardt Behm


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to set QtQuickControls Slider to an initial value without modifying the current saved?

2014-10-16 Thread Bo Thorsen
Den 16-10-2014 17:39, Nuno Santos skrev:
> Hi,
>
> I’m using Slider from QtQuickControls and i’m facing a problem. I initialise 
> the value with a value saved on settings. However, when the slider is 
> instantiated, it is triggering onValueChanged with the default min value. The 
> setting is being correctly saved because I don’t show the slider right away. 
> Only when the slider is show, this is happening and I see the result of the 
> change in settings.
>
> Slider {
>  width: parent.width
>  height: 10
>  minimumValue: 60
>  maximumValue: 180
>  stepSize: 1
>  updateValueWhileDragging: true
>  value: settings.trackWidth
>  onValueChanged: {
>  console.log("track width value changed: " + value)
>  settings.trackWidth = value
>  }
>  Component.onCompleted: {
>  console.log("track width on completed: " + settings.trackWidth)
>  value = settings.trackWidth
>  }
> }
>
> Console:
>
> qml: track width value changed: 60
> qml: track width on completed: 60

It's possible there is an elegant solution to this, but I haven't found 
it so far. What I do in cases like this is to set a boolean property 
initialised to false and set this to true in onCompleted after you set 
the value. In onValueChanged, you check if the bool is true before doing 
anything on the value.

Bo.

-- 
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest