Re: [Interest] Best way to get a QWidget from a device context (HDC)

2015-01-07 Thread Thiago Macieira
On Wednesday 07 January 2015 15:16:56 Jason Dolan wrote: > I’m stuck with some 3rd party code where the input is a device context > (HDC), and I need to get the widget it’s associated with. > > My current implementation (completely untested as of yet) is: > QWidget *w = QWidget::find((WId)WindowFr

Re: [Interest] Best way to get a QWidget from a device context (HDC)

2015-01-07 Thread Andreas Pakulat
Hi Jason, On Wed, Jan 7, 2015 at 9:16 PM, Jason Dolan wrote: > I’m stuck with some 3rd party code where the input is a device context > (HDC), and I need to get the widget it’s associated with. > > My current implementation (completely untested as of yet) is: > > QWidget *w = QWidget::find((WId)

[Interest] Best way to get a QWidget from a device context (HDC)

2015-01-07 Thread Jason Dolan
I’m stuck with some 3rd party code where the input is a device context (HDC), and I need to get the widget it’s associated with. My current implementation (completely untested as of yet) is: QWidget *w = QWidget::find((WId)WindowFromDC(hDC)); #1: I’m not even sure this will work (although I thin

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Michael Sué
Hi, Our application main program looks (essentially) like the following: int main(int argc, char *argv[]) { MyApplication app(argc, argv); MyMainWindow mainWin(); return app.exec(); } We create the one and only network access manager object in the constructor of MyMainWi

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread alexander golks
Am Wed, 7 Jan 2015 12:36:52 + schrieb Nuno Santos : > Hi, > > I’m not really sure. > > Question: > > - On program termination, isn’t all the memory allocated by it deleted? when allocated on heap, no. the memory is just released, not delete()'ed, that is, no dtor is called at all. the m

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Nuno Santos
Hi, I’m not really sure. Question: - On program termination, isn’t all the memory allocated by it deleted? With this approach at least the QNetworkAccessManager which is being allocated by the manager is supposedly being deleted: Manager::~Manager() { _networkAccessManager->deleteLater(

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Michael Sué
Hi, With this approach, the object will no longer be deleted at program exit, right? So there can be no crash on deletion anymore. - Michael. From: interest-bounces+sue=sf.mpg...@qt-project.org [mailto:interest-bounces+sue=sf.mpg...@qt-project.org] On Behalf Of Nuno Santos Sent: Wednesday,

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Bo Thorsen
Den 07-01-2015 kl. 11:30 skrev Nuno Santos: > Hi Igor, > > Ops… You are right, it is not static. > > I have tried your suggestion but now it crashes everytime I close the > app and I can’t even get a stack trace like before. If I run it on > debug, it points me to assembler code. Not anything I can

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Nuno Santos
Hi, I have made the following modification and it seems not crashing anymore: static Manager* gManager = 0; Manager* Manager::sharedManager() { QMutexLocker lock(&managerMutex); if (!gManager) { gManager = new Manager(); } return gManager

Re: [Interest] Stack view and lazy loading of big Qml files

2015-01-07 Thread Nuno Santos
Steve, In the meanwhile I found the answer to the second question but not for the first. I forgot the existence of VisualItemModel which is precisely what I needed. Memory is in fact a problem but my users won’t tolerate a big time between view switch. StackView also allows me to define the

Re: [Interest] Stack view and lazy loading of big Qml files

2015-01-07 Thread Nuno Santos
Hey Steve, That seems a nice suggestion. Questions: - How do you disable or change the animations between index change? - How do you disable interaction with the list itself, because I would need to interact with the content of the page. I will give it a try in the meanwhile. Thanks! Regard

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Nuno Santos
Hi Igor, Ops… You are right, it is not static. I have tried your suggestion but now it crashes everytime I close the app and I can’t even get a stack trace like before. If I run it on debug, it points me to assembler code. Not anything I can really point to. Regards, Nuno > > On 07 Jan 2015

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Nuno Santos
Yes, int main(int argc, char **argv) { QGuiApplication app(argc, argv); ... return app.exec(); } > On 07 Jan 2015, at 09:54, Igor Mironchik wrote: > > Hi, I have one question: is QApplication static too? > > On Wed, 07 Jan 2015 12:32:21 +0300, Nuno Santos > wrote: > >> Hi, >

Re: [Interest] One question about Qt and one not...

2015-01-07 Thread Igor Mironchik
Hi. Forget my second question. I've found the solution. It's forgotten --sysroot="..." But my first question is still actual. And even can I mix Qt libraries built with android-5 platform with another library built, say, with android-19 platform in one Qt-based Android application? On Tue,

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread Igor Mironchik
Hi, I have one question: is QApplication static too? On Wed, 07 Jan 2015 12:32:21 +0300, Nuno Santos wrote: > Hi, > > I’m having a problem with a random crash that not always happens. I > would like to have your advice on how to find the origin of it. > > This crash always happens on program

Re: [Interest] Advice on random program finish crash

2015-01-07 Thread alexander golks
Am Wed, 7 Jan 2015 09:32:21 + schrieb Nuno Santos : > Hi, > > I’m having a problem with a random crash that not always happens. I would > like to have your advice on how to find the origin of it. > > This crash always happens on program exit and the stack trace is the > following: > > Thr

Re: [Interest] Qt Bugtracker update and new URL

2015-01-07 Thread Blasche Alexander
Just a quick reminder that this is going to happen today. -- Alex From: development-bounces+alexander.blasche=theqtcompany@qt-project.org on behalf of Blasche Alexander Sent: Monday, December 15, 2014 15:10 To: developm...@qt-project.org; interest

[Interest] Advice on random program finish crash

2015-01-07 Thread Nuno Santos
Hi, I’m having a problem with a random crash that not always happens. I would like to have your advice on how to find the origin of it. This crash always happens on program exit and the stack trace is the following: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 org.qt-project.QtC

Re: [Interest] Bluetooth Low Energy on Windows: Options and feasabilty of implementing own backend

2015-01-07 Thread Blasche Alexander
Hi Axel, Your assumption about 5.5 is correct. Android gets LE support and ios/OSX get classic and LE support. Windows is currently work in progress. There is a wip/win branch on codereview. The windows port is mostly community driven at this stage which makes prediction somewhat hard. Ccurr