Re: [Interest] What is the best way to refresh QML image
Exactly: I want QML Image to have a refresh() method that will force it to reload the image. One use case: let's say I have a jpg on disk that I'm showing in QML. If I edit the image in an external application and save it again with the same name, I'd like to be able to reload the image without changing the source name. Harri On 10/03/2015 11:34, Daniel França wrote: What exactly you want to do? Em ter, 10 de mar de 2015 às 11:26, Harri Pasanen ha...@mpaja.com mailto:ha...@mpaja.com escreveu: Hi, Is there a way to force QML image to refresh, other than changing its source property? Thanks, Harri ___ Interest mailing list Interest@qt-project.org mailto: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
[Interest] What is the best way to refresh QML image
Hi, Is there a way to force QML image to refresh, other than changing its source property? Thanks, Harri ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] How to crop and scale QCamera input to a widget
Hi All, My camera resolution is 2048 * 1536, now I want to display the center 1000 * 1000 pixels on a 500 * 500 widget, so far I only found setGeometry to crop the image but can't scale it, is there any item for that? thanks in advance Jie ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [OS X] 32bit build on 64bit system?
On Monday March 09 2015 17:38:31 René J.V. Bertin wrote: I think I *was* right :) but also that the culprit wasn't qmake but something fishy in the MacPorts buildsystem I was using. Invoking the exact configure command and then gmake by hand seemed to work fine (I didn't let it complete of course), which led me to the fishy MacPorts setting. I'll report back if there's an issue after all, but for now I'm hoping it was just a false alarm. Sorry for the noise. Since I was making noise anyway: I just finished installing a universal binary version of Qt 5.4.1 (everything except QtWebEngine and the database plugins), and running some initial tests that were conclusive. So not only is it indeed (still) possible to do a 32bit build on a 64bit system, as others reported, it is also possible to create a build script that does both builds and then merges them into a proper UB result. (With the caveat that I haven't yet straightened out my scripts to build the database plugins.) R. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] What is the best way to refresh QML image
So I think this discussion can help you: http://forum.qt.io/topic/6935/how-to-reload-an-image-in-qml/3 Em ter, 10 de mar de 2015 às 11:47, Harri Pasanen ha...@mpaja.com escreveu: Exactly: I want QML Image to have a refresh() method that will force it to reload the image. One use case: let's say I have a jpg on disk that I'm showing in QML. If I edit the image in an external application and save it again with the same name, I'd like to be able to reload the image without changing the source name. Harri On 10/03/2015 11:34, Daniel França wrote: What exactly you want to do? Em ter, 10 de mar de 2015 às 11:26, Harri Pasanen ha...@mpaja.com escreveu: Hi, Is there a way to force QML image to refresh, other than changing its source property? Thanks, Harri ___ 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] What is the best way to refresh QML image
What exactly you want to do? Em ter, 10 de mar de 2015 às 11:26, Harri Pasanen ha...@mpaja.com escreveu: Hi, Is there a way to force QML image to refresh, other than changing its source property? Thanks, Harri ___ 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] [OS X] qmake -spec macx-clang-32 on a 64bit system
On Tuesday March 10 2015 06:34:55 Adam Light wrote: Hi, % ( cd qt5dsql3-mp9-work/qt-everywhere-opensource-src-5.4.1-i386/qtbase/src/plugins/sqldrivers/sqlite ; /opt/local/libexec/qt5/bin/qmake -r PREFIX=/opt/local QMAKE_MACOSX_DEPLOYMENT_TARGET=10.9 CONFIG+=release INCLUDEPATH+=/opt/local/include LIBS+=-L/opt/local/lib -lsqlite3 -spec macx-clang-32 ) I'm not sure if this matters, but before I execute configure, I always execute the following commands: In short, you clean out the build tree. That's what I did too here. Note that I'm not executing configure here. The sqlite plugin is configured with qmake, and I'm trying to build it with the UB build in place already. Not that the nature of the build should matter: qmake should just create a Makefile configured according to its input (sqlite.pro and the macx-clang-32 mkspec). Whether or not that Makefile can give a successful build is a different question, and not qmake's concern. R. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [OS X] qmake -spec macx-clang-32 on a 64bit system
On Tue, Mar 10, 2015 at 6:29 AM, René J.V. rjvber...@gmail.com wrote: Hello, I am getting strange behaviour from qmake, trying to generate a 32bit build with it on a 64bit system. qmake in fact seems to ignore the -spec argument (as long as it's not in error, that is). I get exactly the same Makefile even when I tell qmake to use linux-g++, for instance ... And this time I can rule out any interference from the MacPorts runtime: % ( cd qt5dsql3-mp9-work/qt-everywhere-opensource-src-5.4.1-i386/qtbase/src/plugins/sqldrivers/sqlite ; /opt/local/libexec/qt5/bin/qmake -r PREFIX=/opt/local QMAKE_MACOSX_DEPLOYMENT_TARGET=10.9 CONFIG+=release INCLUDEPATH+=/opt/local/include LIBS+=-L/opt/local/lib -lsqlite3 -spec macx-clang-32 ) I'm not sure if this matters, but before I execute configure, I always execute the following commands: cd /qtbuild5/build/mac32 rm -rf * rm .qmake.* I do this for both 32 and 64 bit builds. Adam ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] [OS X] qmake -spec macx-clang-32 on a 64bit system
Hello, I am getting strange behaviour from qmake, trying to generate a 32bit build with it on a 64bit system. qmake in fact seems to ignore the -spec argument (as long as it's not in error, that is). I get exactly the same Makefile even when I tell qmake to use linux-g++, for instance ... And this time I can rule out any interference from the MacPorts runtime: % ( cd qt5dsql3-mp9-work/qt-everywhere-opensource-src-5.4.1-i386/qtbase/src/plugins/sqldrivers/sqlite ; /opt/local/libexec/qt5/bin/qmake -r PREFIX=/opt/local QMAKE_MACOSX_DEPLOYMENT_TARGET=10.9 CONFIG+=release INCLUDEPATH+=/opt/local/include LIBS+=-L/opt/local/lib -lsqlite3 -spec macx-clang-32 ) % head qt5dsql3-mp9-work/qt-everywhere-opensource-src-5.4.1-i386/qtbase/src/plugins/sqldrivers/sqlite/Makefile # # Makefile for building: libqsqlite.dylib # Generated by qmake (3.0) (Qt 5.4.1) # Project: sqlite.pro # Template: lib # Command: /opt/local/libexec/qt5/bin/qmake PREFIX=/opt/local QMAKE_MACOSX_DEPLOYMENT_TARGET=10.9 CONFIG+=release INCLUDEPATH+=/opt/local/include LIBS+=-L/opt/local/lib\ -lsqlite3 -spec macx-clang-32 -o Makefile sqlite.pro # MAKEFILE = Makefile ### Compiler, tools and options CC= /usr/bin/clang -arch x86_64 CXX = /usr/bin/clang++ -arch x86_64 DEFINES = -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB CFLAGS= -Os -arch x86_64 -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9 -fvisibility=hidden -fno-exceptions -Wall -W -fPIC $(DEFINES) CXXFLAGS = -Os -arch x86_64 -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.9 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -fPIC $(DEFINES) % cat qt5dsql3-mp9-work/qt-everywhere-opensource-src-5.4.1-i386/qtbase/.qmake.stash QMAKE_XCODE_DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer QMAKE_XCODE_VERSION = 6.1.1 QMAKE_MAC_SDK.macosx.path = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk QMAKE_MAC_SDK.macosx.version = 10.9 QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_CC = \ /usr/bin/clang \ -arch \ x86_64 QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_CXX = \ /usr/bin/clang++ \ -arch \ x86_64 QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_FIX_RPATH = \ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool \ -id QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_AR = \ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar \ cq QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_RANLIB = \ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib \ -s QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_LINK = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ QMAKE_MAC_SDK.macx-clang-32.macosx.QMAKE_LINK_SHLIB = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ QMAKE_MAC_SDK.macosx.platform_name = macosx % cat /opt/local/share/qt5/mkspecs/macx-clang-32/qmake.conf # # qmake configuration for 32-bit Clang on OS X # MAKEFILE_GENERATOR = UNIX CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) include(../common/gcc-base-mac.conf) include(../common/clang.conf) include(../common/clang-mac.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 QMAKE_CFLAGS += -arch i386 QMAKE_OBJECTIVE_CFLAGS += -arch i386 QMAKE_CXXFLAGS += -arch i386 QMAKE_LFLAGS += -arch i386 load(qt_config) % /opt/local/libexec/qt5/bin/qmake -query INCLUDEPATH:/opt/local/include INCPATH:/opt/local/include QMAKE_LIBDIR:/opt/local/lib QT_SYSROOT: QT_INSTALL_PREFIX:/opt/local QT_INSTALL_ARCHDATA:/opt/local/libexec/qt5 QT_INSTALL_DATA:/opt/local/share/qt5 QT_INSTALL_DOCS:/opt/local/share/doc/qt5 QT_INSTALL_HEADERS:/opt/local/include/qt5 QT_INSTALL_LIBS:/opt/local/libexec/qt5/Library/Frameworks QT_INSTALL_LIBEXECS:/opt/local/libexec/qt5/libexec QT_INSTALL_BINS:/opt/local/libexec/qt5/bin QT_INSTALL_TESTS:/opt/local/share/qt5/tests QT_INSTALL_PLUGINS:/opt/local/share/qt5/plugins QT_INSTALL_IMPORTS:/opt/local/share/qt5/imports QT_INSTALL_QML:/opt/local/share/qt5/qml QT_INSTALL_TRANSLATIONS:/opt/local/share/qt5/translations QT_INSTALL_CONFIGURATION:/opt/local/etc/qt5
Re: [Interest] Qt Contributors' Summit 6-7th June 2015 in Oslo
Reminder that the Qt Contributors' Summit registration for an invite is still open. To make sure you have a place, please fill in the registration form at: https://www.webropolsurveys.com/S/F506847B071344BB.par For more info see: http://blog.qt.io/blog/2015/01/29/the-trolls-invite-you-to-oslo/ Best regards, Tero From: interest-bounces+tero.kojo=theqtcompany@qt-project.org [mailto:interest-bounces+tero.kojo=theqtcompany@qt-project.org] On Behalf Of Kojo Tero Sent: 4. helmikuuta 2015 14:49 To: Qt Project Subject: [Interest] Qt Contributors' Summit 6-7th June 2015 in Oslo Hello, The Qt Contributors' Summit 2015 will be held in Oslo, the home of Qt, in early June. This year the venue will be at The Qt Company offices, and we will have an unofficial get-together on Friday before the Summit. The event is the annual gathering of Qt contributors (code, tests, documentation, forum support...), where people gather to discuss the current state and future of Qt. The atmosphere is relaxed and centered around technical discussions. The format of the event, as in previous years, will be an un-conference with several tracks in parallel. For more details, please visit the Qt blog: http://blog.qt.io/blog/2015/01/29/the-trolls-invite-you-to-oslo/ To make sure you have a place, please fill in the registration form at: https://www.webropolsurveys.com/S/F506847B071344BB.par See you in Oslo, Tero Qt Online Community Manager - The Qt Company QtCS 2015 co-ordinator ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] What is the best way to refresh QML image
Well, reading the thread it seems that options are: 1. changing the source property, which feels like a hack if used directly. 2. setting cache=false and calling sourceChanged(), but it was not clear from the thread if this works or not. 3. implementing a custom item to replace Image, which feels like an overkill for this. I ended up writing a NameStore in C++ which serves the names used for source and can then redirect those as I wish. It is convenient in that it act as a central broker, touching an image will cause all linked Image elements to update. Regards, Harri On 10/03/2015 11:49, Daniel França wrote: So I think this discussion can help you: http://forum.qt.io/topic/6935/how-to-reload-an-image-in-qml/3 Em ter, 10 de mar de 2015 às 11:47, Harri Pasanen ha...@mpaja.com mailto:ha...@mpaja.com escreveu: Exactly: I want QML Image to have a refresh() method that will force it to reload the image. One use case: let's say I have a jpg on disk that I'm showing in QML. If I edit the image in an external application and save it again with the same name, I'd like to be able to reload the image without changing the source name. Harri On 10/03/2015 11:34, Daniel França wrote: What exactly you want to do? Em ter, 10 de mar de 2015 às 11:26, Harri Pasanen ha...@mpaja.com mailto:ha...@mpaja.com escreveu: Hi, Is there a way to force QML image to refresh, other than changing its source property? Thanks, Harri ___ Interest mailing list Interest@qt-project.org mailto: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] What is the best way to refresh QML image
Hi Harry, If you want a low-tech, QML-only workaround, perhaps you could have 2 Images at the same location with the same dimensions, and just switch between them when a refresh occurs. You could stage the refreshed picture into the currently invisible, source-less Image, then set it to visible, then on the other Image you could set visible to false and source string to a null string. You could also swap the Images z values at this time, to make the currently invisible one always be behind the currently visible one. That would avoid any flicker during the switching between Images. I'm thinking this is probably not so inefficient, because most of the time, only one Image would be visible. - VStevenP Steve Pavao Korg RD Message: 3 Date: Tue, 10 Mar 2015 11:47:39 +0100 From: Harri Pasanen ha...@mpaja.com Subject: Re: [Interest] What is the best way to refresh QML image To: Daniel Fran?a daniel.fra...@gmail.com,interest@qt-project.org interest@qt-project.org Message-ID: 54fecbcb.2010...@mpaja.com Content-Type: text/plain; charset=utf-8 Exactly: I want QML Image to have a refresh() method that will force it to reload the image. One use case: let's say I have a jpg on disk that I'm showing in QML. If I edit the image in an external application and save it again with the same name, I'd like to be able to reload the image without changing the source name. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QProcess to start a process at a higher priority
One last thing. I am trying to start the VBS with: p-startDetached(go.vbs, arguments); However, this returns false and does not start the vbs. I see that you use cscript to start yours, but you do not pass any arguments. How would that be accomplished? Basically, in the line above, the arguments is a QStringList that I can pass to go.vbs. How would I invoke cscript and pass arguments to the vbs? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com Date: Tuesday, March 10, 2015 at 12:02 PM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com, NoMercy nome...@gmail.commailto:nome...@gmail.com, interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Answered my own question, it appears if I just wrap the arguments in chr(34)’s it will retain the integrity of the argument. Thanks Emre. -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com To: NoMercy nome...@gmail.commailto:nome...@gmail.com, interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Emre, thanks so much. I do indeed have a static number of arguments. Unfortunately, the reason they are quoted was because the arguments have spaces in them and Wscript.Arguments wants to ignore the quotes :) -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: NoMercy nome...@gmail.commailto:nome...@gmail.com Date: Tuesday, March 10, 2015 at 11:15 AM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com, interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Hello again, for that I have something like this (if you have a static number of arguments); Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\your_app_dir 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\ your_app_dir\your_bat.bat chr(34) Wscript.Arguments(0) Wscript.Arguments(1) , 0 Set WshShell = Nothing Happy Coding Emre On Tue, Mar 10, 2015 at 5:09 PM, Jason Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com wrote: Thanks! Honestly, I do not have much experience with Vbscript. In your example below, how would I pass arguments to the your_bat.bat? I have 8 quoted arguments that I need to pass the bat file. I have tried this Dim arg0 arg0 = WScript.Arguments.Item(0) WScript.Echo arg0 WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat arg0 chr(34) , 0 But that is not quite right. It echos the arg0 fine but I get a “The system cannot find the file specified” when I run that. Thoughts? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: NoMercy nome...@gmail.commailto:nome...@gmail.com Date: Monday, March 9, 2015 at 5:27 AM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com Subject: Re: [Interest] QProcess to start a process at a higher priority Our app uses an ugly method for exactly this reason and I intend to research and find a better solution on this subject when I have time but for the moment we use cscript.exe /path/to/your/script.vbs in vbs: Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\ yourapp 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat chr(34) , 0 Set WshShell = Nothing And if I'm remembering correctly the zero (0) at the end of line that starts with WshShell.Run makes it windowless. Happy coding Emre On Mon, Mar 9, 2015 at 1:53 AM, Jason Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com wrote: Hello all, I am tinkering a bit with QProcess on Windows7. What I would like to be able to do is to start a process with a “high” priority. My application spawns multiple processes and I am tinkering with them in order to help ensure they get their processor time. On the command line, I would do this. start /high myspawn.exe arg1 arg2 arg3 Unfortunately one of the requirements is that a DOS window not open to run it. If I start the process like this: QString program = “myspawn.exe; QStringList arguments; arguments “arg1”
[Interest] Deploying 5.4.0 Application to Linux
I am having an issue trying to create a self contained app package on Linux. Specifically I am using Mint 17.x for development and Qt 5.4.0 offline installer. I use CMake for my build system. I have no issues debugging my application so that sanity check works from QtCreator. I have created a folder where I have placed my application (DREAM3D), a shell script (DREAM3D.sh) and qt.conf. I have also created a lib directory and a plugins directory. In the plugins directory I have the platforms directory that contains the libqxcb.so file. I have placed all the qt libraries in the lib directory. I have exported the LD_LIBRARY_PATH correctly. I have placed the following in the qt.conf: [Paths] Plugins=plugins When I start the app from the terminal i get the dreaded [mjackson@MintDev1:DREAM3D-5.2.967-Linux-x86_64]$ ./DREAM3D This application failed to start because it could not find or load the Qt platform plugin xcb. Reinstalling the application may fix this problem. Aborted I have googled about as much as possible. Everyone seems to say the same thing, to which I have followed the instructions and I _think_ I have everything setup the way the articles/postings/blogs have instructed but still nothing is working. Has anyone ever encountered this and what was the problem? Thanks for any help. -- Mike Jackson imikejackson _at_ gee-mail dot com ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QProcess to start a process at a higher priority
Hello again, for that I have something like this (if you have a static number of arguments); Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\your_app_dir 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\ your_app_dir\your_bat.bat chr(34) Wscript.Arguments(0) Wscript.Arguments(1) , 0 Set WshShell = Nothing Happy Coding Emre On Tue, Mar 10, 2015 at 5:09 PM, Jason Kretzer ja...@gocodigo.com wrote: Thanks! Honestly, I do not have much experience with Vbscript. In your example below, how would I pass arguments to the your_bat.bat? I have 8 quoted arguments that I need to pass the bat file. I have tried this Dim arg0 arg0 = WScript.Arguments.Item(0) WScript.Echo arg0 WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat arg0 chr(34) , 0 But that is not quite right. It echos the arg0 fine but I get a “The system cannot find the file specified” when I run that. Thoughts? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com //-// From: NoMercy nome...@gmail.com Date: Monday, March 9, 2015 at 5:27 AM To: Jason R. Kretzer ja...@gocodigo.com Subject: Re: [Interest] QProcess to start a process at a higher priority Our app uses an ugly method for exactly this reason and I intend to research and find a better solution on this subject when I have time but for the moment we use cscript.exe /path/to/your/script.vbs in vbs: Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\ yourapp 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat chr(34) , 0 Set WshShell = Nothing And if I'm remembering correctly the zero (0) at the end of line that starts with WshShell.Run makes it windowless. Happy coding Emre On Mon, Mar 9, 2015 at 1:53 AM, Jason Kretzer ja...@gocodigo.com wrote: Hello all, I am tinkering a bit with QProcess on Windows7. What I would like to be able to do is to start a process with a “high” priority. My application spawns multiple processes and I am tinkering with them in order to help ensure they get their processor time. On the command line, I would do this. start /high myspawn.exe arg1 arg2 arg3 Unfortunately one of the requirements is that a DOS window not open to run it. If I start the process like this: QString program = “myspawn.exe; QStringList arguments; arguments “arg1” “arg2 “arg3; QProcess *p = new QProcess(this); QTimer::singleShot(3, this, SLOT(deleteLater())); qDebug() starting mysawn process -- p-startDetached(program, arguments); It starts just fine, no DOS window, but at Normal priority. I have tried multiple ways using the “start /high…” command inside of the various ways to execute a command with QProcess, but they always flash a DOS window. I even create a .bat file with the command in it and passed arguments in with the above code. While it worked, it flashed the DOS window. Am I missing something here? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com //-// ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- No virus found in this message. Checked by AVG - www.avg.com Version: 2015.0.5645 / Virus Database: 4299/9221 - Release Date: 03/03/15 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] ListView.currentIndex
ListView currentIndex behavior is bit of a mystery to me. I have a StackView where one page has a ListView. If I leave the page and come back to it, it seems that the currentIndex is somehow stuck and does no longer update when I scroll the list. Only when I reinitialize the ListView model, does the currentIndex start updating again. Any advice? Thanks, Harri ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QProcess to start a process at a higher priority
Emre, thanks so much. I do indeed have a static number of arguments. Unfortunately, the reason they are quoted was because the arguments have spaces in them and Wscript.Arguments wants to ignore the quotes :) -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: NoMercy nome...@gmail.commailto:nome...@gmail.com Date: Tuesday, March 10, 2015 at 11:15 AM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com, interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Hello again, for that I have something like this (if you have a static number of arguments); Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\your_app_dir 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\ your_app_dir\your_bat.bat chr(34) Wscript.Arguments(0) Wscript.Arguments(1) , 0 Set WshShell = Nothing Happy Coding Emre On Tue, Mar 10, 2015 at 5:09 PM, Jason Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com wrote: Thanks! Honestly, I do not have much experience with Vbscript. In your example below, how would I pass arguments to the your_bat.bat? I have 8 quoted arguments that I need to pass the bat file. I have tried this Dim arg0 arg0 = WScript.Arguments.Item(0) WScript.Echo arg0 WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat arg0 chr(34) , 0 But that is not quite right. It echos the arg0 fine but I get a “The system cannot find the file specified” when I run that. Thoughts? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: NoMercy nome...@gmail.commailto:nome...@gmail.com Date: Monday, March 9, 2015 at 5:27 AM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com Subject: Re: [Interest] QProcess to start a process at a higher priority Our app uses an ugly method for exactly this reason and I intend to research and find a better solution on this subject when I have time but for the moment we use cscript.exe /path/to/your/script.vbs in vbs: Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\ yourapp 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat chr(34) , 0 Set WshShell = Nothing And if I'm remembering correctly the zero (0) at the end of line that starts with WshShell.Run makes it windowless. Happy coding Emre On Mon, Mar 9, 2015 at 1:53 AM, Jason Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com wrote: Hello all, I am tinkering a bit with QProcess on Windows7. What I would like to be able to do is to start a process with a “high” priority. My application spawns multiple processes and I am tinkering with them in order to help ensure they get their processor time. On the command line, I would do this. start /high myspawn.exe arg1 arg2 arg3 Unfortunately one of the requirements is that a DOS window not open to run it. If I start the process like this: QString program = “myspawn.exe; QStringList arguments; arguments “arg1” “arg2 “arg3; QProcess *p = new QProcess(this); QTimer::singleShot(3, this, SLOT(deleteLater())); qDebug() starting mysawn process -- p-startDetached(program, arguments); It starts just fine, no DOS window, but at Normal priority. I have tried multiple ways using the “start /high…” command inside of the various ways to execute a command with QProcess, but they always flash a DOS window. I even create a .bat file with the command in it and passed arguments in with the above code. While it worked, it flashed the DOS window. Am I missing something here? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// ___ Interest mailing list Interest@qt-project.orgmailto:Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest No virus found in this message. Checked by AVG - www.avg.comhttp://www.avg.com Version: 2015.0.5645 / Virus Database: 4299/9221 - Release Date: 03/03/15 No virus found in this message. Checked by AVG - www.avg.comhttp://www.avg.com Version: 2015.0.5645 / Virus Database: 4299/9221 - Release Date: 03/03/15 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QProcess to start a process at a higher priority
Answered my own question, it appears if I just wrap the arguments in chr(34)’s it will retain the integrity of the argument. Thanks Emre. -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com To: NoMercy nome...@gmail.commailto:nome...@gmail.com, interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Emre, thanks so much. I do indeed have a static number of arguments. Unfortunately, the reason they are quoted was because the arguments have spaces in them and Wscript.Arguments wants to ignore the quotes :) -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: NoMercy nome...@gmail.commailto:nome...@gmail.com Date: Tuesday, March 10, 2015 at 11:15 AM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com, interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Hello again, for that I have something like this (if you have a static number of arguments); Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\your_app_dir 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\ your_app_dir\your_bat.bat chr(34) Wscript.Arguments(0) Wscript.Arguments(1) , 0 Set WshShell = Nothing Happy Coding Emre On Tue, Mar 10, 2015 at 5:09 PM, Jason Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com wrote: Thanks! Honestly, I do not have much experience with Vbscript. In your example below, how would I pass arguments to the your_bat.bat? I have 8 quoted arguments that I need to pass the bat file. I have tried this Dim arg0 arg0 = WScript.Arguments.Item(0) WScript.Echo arg0 WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat arg0 chr(34) , 0 But that is not quite right. It echos the arg0 fine but I get a “The system cannot find the file specified” when I run that. Thoughts? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// From: NoMercy nome...@gmail.commailto:nome...@gmail.com Date: Monday, March 9, 2015 at 5:27 AM To: Jason R. Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com Subject: Re: [Interest] QProcess to start a process at a higher priority Our app uses an ugly method for exactly this reason and I intend to research and find a better solution on this subject when I have time but for the moment we use cscript.exe /path/to/your/script.vbs in vbs: Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\ yourapp 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat chr(34) , 0 Set WshShell = Nothing And if I'm remembering correctly the zero (0) at the end of line that starts with WshShell.Run makes it windowless. Happy coding Emre On Mon, Mar 9, 2015 at 1:53 AM, Jason Kretzer ja...@gocodigo.commailto:ja...@gocodigo.com wrote: Hello all, I am tinkering a bit with QProcess on Windows7. What I would like to be able to do is to start a process with a “high” priority. My application spawns multiple processes and I am tinkering with them in order to help ensure they get their processor time. On the command line, I would do this. start /high myspawn.exe arg1 arg2 arg3 Unfortunately one of the requirements is that a DOS window not open to run it. If I start the process like this: QString program = “myspawn.exe; QStringList arguments; arguments “arg1” “arg2 “arg3; QProcess *p = new QProcess(this); QTimer::singleShot(3, this, SLOT(deleteLater())); qDebug() starting mysawn process -- p-startDetached(program, arguments); It starts just fine, no DOS window, but at Normal priority. I have tried multiple ways using the “start /high…” command inside of the various ways to execute a command with QProcess, but they always flash a DOS window. I even create a .bat file with the command in it and passed arguments in with the above code. While it worked, it flashed the DOS window. Am I missing something here? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.commailto:ja...@gocodigo.com //-// ___ Interest mailing list Interest@qt-project.orgmailto:Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest No virus found in this message.
Re: [Interest] Qt Performance : QT Widget Application vs WPF
On Tue, Mar 10, 2015 at 12:19:42PM +0530, Chandralatha Harish wrote: Hi All, I was trying to evaluate QT vs WPF in terms of Memory , Performance , Window HAndles, User objects, GDI and so on.. So built 2 identical looking controls in WPF and QT with all values harcoded. BAsically a usercontrol - which is QFrame holding 3 Labels with text, 3 labels with Images, 3 combo box, and created the usercontrol in a loop of 100, 200 ,1000 , 1 and so on... with the button click on the main window, The code in QT is as follows... void MainWindow::on_pushButton_clicked() { QElapsedTimer myTimer; myTimer.start(); for(int i=0;i100;i++) { QListWidgetItem *item=new QListWidgetItem(ui-listWidget); UserControl *row=new UserControl (0); item-setSizeHint(row-maximumSize()); ui-listWidget-setItemWidget(item,row); } ui-timeLabel-setText( QString::number(myTimer.elapsed())+ ms); } On Measuring the performance, with the above code in QT (vs WPF with very identical code in WPF) - First of all in QT,I could notice a lot difference in performance measure between the debug build vs release build of QT( say if release build take 1.3 sec to create 200 controls debug build takes around 7 sec) That's expected. Release builds are typically done with an higher compiler optimization level. -- On creating 100 and 200 user controls the performance measures of WPF were identical to performance measures of release build in QT. You do not compare User Control construction times, you are comparing a seemingly good WPF implementation with a wrong Qt implementation. I am not sure what you do on the WPF side, but if you really use the code you show up you have (at least) quadratic behaviour on the Qt side as the geometry update is triggered on each insertion, and due to the way you populate your list each geometry update iterates over all existing items. You are using the wrong view container here. QListWidget is a convenience widget, good for a couple of dozen entries. For heavy duty (i.e. 10+) you should use some Q*View and a suitable model. -- but on increasing the loop size, i noticed QT performance was pretty bad w.r.t to WPF. for 1000 UserControls- WPF took - 7sec( creation + render time) and 137 MB of memory while QT took - 15 sec(creation+render time) and 147MB of memory for 10,000 usercontrols- WPF took - 79sec and 1 GB memory QT took - 22 mins for creation and rendering and 1GB of memory Note: Each UserControls Contains around 9 controls Can some one comment on - Is QT Performance bad compared to WPF for huge number of controls? - Is it the issue with the Rendering engine used by default. I'm using QT 5.4 64 bit Open source version of QT. - the below states QT native rendering suffers with Performance issues - and Raster graphics to be used https://kjellkod.wordpress.com/2011/05/22/moving-to-qt5-will-that-remove-qts-performance-issues-on-linux/ How to switch to Raster Graphics inQT 5? Understand that QApplication.SetGraphicsSystem has been deprecated in QT5. -- Is QT Quick better vs Widget application in terms of performance? None of these questions are really relevant for your performance problem The answer to each of them would be Unlikely, but to get reasonable performance you need to chose a non-quadratic approach first. Andre' ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] To rpath or not when building Qt
On Tuesday 10 March 2015 19:07:19 Scott Aron Bloom wrote: When building Qt for distribution via LGPL of a closed source product using shared libraries. What is the best method to make sure the plugins pickup the Qt libraries you are shipping? RPATH with $ORIGIN and make sure that the linker option --enable-new-dtags is off. If that option is turned on, then the -rpath option inserts DT_RUNPATH instead of DT_RPATH dynamic tags and those can be overridden by the LD_LIBRARY_PATH environment variable. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....
Hi, just 'discovered' that bindValue does not seem to work with CREATE TABLE statements. One could ask, why would anyone want to use a bound value in a CREATE TABLE statement. Here my query: CREATE TEMP TABLE selectseriestable AS SELECT title FROM titlegroup,title WHERE titlegroup.seriesID=(SELECT seriesid FROM series WHERE series=:series AND version=:version) AND titlegroup.titleID=title.titleID;; Works fine when I replace :series and :version with concrete values. Now the question is... is this supposed to work? Is it a bug? Or should it be ignored as some strange fringe use case and at best be documented? Ok, there is also the remote possibility that I overlooked something or made a mistake. ;-) The database I currently use is postgresql. Guido ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QProcess to start a process at a higher priority
Hello again, BTW using this method you can put args in quotes too like QString( cscript C:\\progra~1\\yourpath\\your_vbs.vbs \%1\ \%2\ \%3\ \%4\ ).arg( arg_var_0).arg(arg_var_1).arg(arg_var_2).arg(arg_var_3); Happy coding, Emre On Tue, Mar 10, 2015 at 9:27 PM, NoMercy nome...@gmail.com wrote: Hello, I use it like this; QProcess *procPort1 = new QProcess(this); QString cmdPort1 = QString( cscript C:\\progra~1\\yourpath\\your_vbs.vbs %1 %2 %3 %4 ).arg(arg_var_0).arg(arg_var_1).arg(arg_var_2).arg(arg_var_3); procPort1-start(cmdPort1); hope it helps :) Happy coding, Emre On Tue, Mar 10, 2015 at 6:59 PM, Jason Kretzer ja...@gocodigo.com wrote: One last thing. I am trying to start the VBS with: p-startDetached(go.vbs, arguments); However, this returns false and does not start the vbs. I see that you use cscript to start yours, but you do not pass any arguments. How would that be accomplished? Basically, in the line above, the arguments is a QStringList that I can pass to go.vbs. How would I invoke cscript and pass arguments to the vbs? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com //-// From: Jason R. Kretzer ja...@gocodigo.com Date: Tuesday, March 10, 2015 at 12:02 PM To: Jason R. Kretzer ja...@gocodigo.com, NoMercy nome...@gmail.com, interest@qt-project.org interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Answered my own question, it appears if I just wrap the arguments in chr(34)’s it will retain the integrity of the argument. Thanks Emre. -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com //-// From: Jason R. Kretzer ja...@gocodigo.com To: NoMercy nome...@gmail.com, interest@qt-project.org interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Emre, thanks so much. I do indeed have a static number of arguments. Unfortunately, the reason they are quoted was because the arguments have spaces in them and Wscript.Arguments wants to ignore the quotes :) -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com //-// From: NoMercy nome...@gmail.com Date: Tuesday, March 10, 2015 at 11:15 AM To: Jason R. Kretzer ja...@gocodigo.com, interest@qt-project.org interest@qt-project.org Subject: Re: [Interest] QProcess to start a process at a higher priority Hello again, for that I have something like this (if you have a static number of arguments); Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\your_app_dir 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\ your_app_dir\your_bat.bat chr(34) Wscript.Arguments(0) Wscript.Arguments(1) , 0 Set WshShell = Nothing Happy Coding Emre On Tue, Mar 10, 2015 at 5:09 PM, Jason Kretzer ja...@gocodigo.com wrote: Thanks! Honestly, I do not have much experience with Vbscript. In your example below, how would I pass arguments to the your_bat.bat? I have 8 quoted arguments that I need to pass the bat file. I have tried this Dim arg0 arg0 = WScript.Arguments.Item(0) WScript.Echo arg0 WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat arg0 chr(34) , 0 But that is not quite right. It echos the arg0 fine but I get a “The system cannot find the file specified” when I run that. Thoughts? -Jason //--// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com //-// From: NoMercy nome...@gmail.com Date: Monday, March 9, 2015 at 5:27 AM To: Jason R. Kretzer ja...@gocodigo.com Subject: Re: [Interest] QProcess to start a process at a higher priority Our app uses an ugly method for exactly this reason and I intend to research and find a better solution on this subject when I have time but for the moment we use cscript.exe /path/to/your/script.vbs in vbs: Set WshShell = CreateObject(WScript.Shell) WshShell.currentdirectory = C:\Program Files\ yourapp 'wscript.echo WshShell.currentdirectory WshShell.Run chr(34) C:\Program Files\yourapp\your_bat.bat chr(34) , 0 Set WshShell = Nothing And if I'm remembering correctly the zero (0) at the end of line that starts with WshShell.Run makes it windowless. Happy coding Emre On Mon, Mar 9, 2015 at 1:53 AM, Jason Kretzer ja...@gocodigo.com wrote: Hello all, I am tinkering a bit with QProcess on Windows7. What I would like to be able to do is to start a process with a “high” priority. My application spawns multiple processes and I am tinkering with them in order to help ensure they get their processor time. On the command line, I would do this. start /high
[Interest] To rpath or not when building Qt
When building Qt for distribution via LGPL of a closed source product using shared libraries. What is the best method to make sure the plugins pickup the Qt libraries you are shipping? Scott ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Qt Performance : QT Widget Application vs WPF
Hi All, I was trying to evaluate QT vs WPF in terms of Memory , Performance , Window HAndles, User objects, GDI and so on.. So built 2 identical looking controls in WPF and QT with all values harcoded. BAsically a usercontrol - which is QFrame holding 3 Labels with text, 3 labels with Images, 3 combo box, and created the usercontrol in a loop of 100, 200 ,1000 , 1 and so on... with the button click on the main window, The code in QT is as follows... void MainWindow::on_pushButton_clicked() { QElapsedTimer myTimer; myTimer.start(); for(int i=0;i100;i++) { QListWidgetItem *item=new QListWidgetItem(ui-listWidget); UserControl *row=new UserControl (0); item-setSizeHint(row-maximumSize()); ui-listWidget-setItemWidget(item,row); } ui-timeLabel-setText( QString::number(myTimer.elapsed())+ ms); } On Measuring the performance, with the above code in QT (vs WPF with very identical code in WPF) - First of all in QT,I could notice a lot difference in performance measure between the debug build vs release build of QT( say if release build take 1.3 sec to create 200 controls debug build takes around 7 sec) -- On creating 100 and 200 user controls the performance measures of WPF were identical to performance measures of release build in QT. -- but on increasing the loop size, i noticed QT performance was pretty bad w.r.t to WPF. for 1000 UserControls- WPF took - 7sec( creation + render time) and 137 MB of memory while QT took - 15 sec(creation+render time) and 147MB of memory for 10,000 usercontrols- WPF took - 79sec and 1 GB memory QT took - 22 mins for creation and rendering and 1GB of memory Note: Each UserControls Contains around 9 controls Can some one comment on - Is QT Performance bad compared to WPF for huge number of controls? - Is it the issue with the Rendering engine used by default. I'm using QT 5.4 64 bit Open source version of QT. - the below states QT native rendering suffers with Performance issues - and Raster graphics to be used https://kjellkod.wordpress.com/2011/05/22/moving-to-qt5-will-that-remove-qts-performance-issues-on-linux/ How to switch to Raster Graphics inQT 5? Understand that QApplication.SetGraphicsSystem has been deprecated in QT5. -- Is QT Quick better vs Widget application in terms of performance? Thanks in Advance, Latha ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt Performance : QT Widget Application vs WPF
Hello. When you create a widget with no parent, it becomes a separate window. So, you're creating 200 (native) windows and then destroy them when you put a widget in a list. Creating native controls is a very slow operation. Try passing a view as a parent for UserControl. Next, what is real usecase? I haven't seen any applications with 200 forms in a list. Иван Комиссаров 10 марта 2015 г., в 9:49, Chandralatha Harish chandralath...@gmail.com написал(а): Hi All, I was trying to evaluate QT vs WPF in terms of Memory , Performance , Window HAndles, User objects, GDI and so on.. So built 2 identical looking controls in WPF and QT with all values harcoded. BAsically a usercontrol - which is QFrame holding 3 Labels with text, 3 labels with Images, 3 combo box, and created the usercontrol in a loop of 100, 200 ,1000 , 1 and so on... with the button click on the main window, The code in QT is as follows... void MainWindow::on_pushButton_clicked() { QElapsedTimer myTimer; myTimer.start(); for(int i=0;i100;i++) { QListWidgetItem *item=new QListWidgetItem(ui-listWidget); UserControl *row=new UserControl (0); item-setSizeHint(row-maximumSize()); ui-listWidget-setItemWidget(item,row); } ui-timeLabel-setText( QString::number(myTimer.elapsed())+ ms); } On Measuring the performance, with the above code in QT (vs WPF with very identical code in WPF) - First of all in QT,I could notice a lot difference in performance measure between the debug build vs release build of QT( say if release build take 1.3 sec to create 200 controls debug build takes around 7 sec) -- On creating 100 and 200 user controls the performance measures of WPF were identical to performance measures of release build in QT. -- but on increasing the loop size, i noticed QT performance was pretty bad w.r.t to WPF. for 1000 UserControls- WPF took - 7sec( creation + render time) and 137 MB of memory while QT took - 15 sec(creation+render time) and 147MB of memory for 10,000 usercontrols- WPF took - 79sec and 1 GB memory QT took - 22 mins for creation and rendering and 1GB of memory Note: Each UserControls Contains around 9 controls Can some one comment on - Is QT Performance bad compared to WPF for huge number of controls? - Is it the issue with the Rendering engine used by default. I'm using QT 5.4 64 bit Open source version of QT. - the below states QT native rendering suffers with Performance issues - and Raster graphics to be usedhttps://kjellkod.wordpress.com/2011/05/22/moving-to-qt5-will-that-remove-qts-performance-issues-on-linux/ https://kjellkod.wordpress.com/2011/05/22/moving-to-qt5-will-that-remove-qts-performance-issues-on-linux/ How to switch to Raster Graphics inQT 5? Understand that QApplication.SetGraphicsSystem has been deprecated in QT5. -- Is QT Quick better vs Widget application in terms of performance? Thanks in Advance, Latha ___ 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] Qt Performance : QT Widget Application vs WPF
Good to know. Should I ever have the use case where I have to create 1000 identical looking controls in a loop I will use WPF. Guido On Tue, 10 Mar 2015 12:19:42 +0530 Chandralatha Harish chandralath...@gmail.com wrote: Hi All, I was trying to evaluate QT vs WPF in terms of Memory , Performance , Window HAndles, User objects, GDI and so on.. So built 2 identical looking controls in WPF and QT with all values harcoded. BAsically a usercontrol - which is QFrame holding 3 Labels with text, 3 labels with Images, 3 combo box, and created the usercontrol in a loop of 100, 200 ,1000 , 1 and so on... with the button click on the main window, The code in QT is as follows... ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt Performance : QT Widget Application vs WPF
When you buy a car, don't you check if it can go to Alpha Centauri? :-) -- Reinhardt On Tuesday 10 March 2015 08:20:01 Guido Seifert wrote: Good to know. Should I ever have the use case where I have to create 1000 identical looking controls in a loop I will use WPF. Guido On Tue, 10 Mar 2015 12:19:42 +0530 Chandralatha Harish chandralath...@gmail.com wrote: Hi All, I was trying to evaluate QT vs WPF in terms of Memory , Performance , Window HAndles, User objects, GDI and so on.. So built 2 identical looking controls in WPF and QT with all values harcoded. BAsically a usercontrol - which is QFrame holding 3 Labels with text, 3 labels with Images, 3 combo box, and created the usercontrol in a loop of 100, 200 ,1000 , 1 and so on... with the button click on the main window, The code in QT is as follows... ___ 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