Re: [Interest] server certificate integration

2024-02-26 Thread Samuel Gaist via Interest
Hi,

Why not pass the path to the certificate as a parameter of your application ?

That way, you can configure it in the startup script of your server and just 
need to restart/reload it when the time comes to update the certificate.

Another possibility is to use a configuration file in which you point your 
application to where the certificates are.

Hope it helps

Best regards
Samuel

> On 26 Feb 2024, at 16:11, Alexander Carôt via Interest 
>  wrote:
> 
> Hi all,
> 
> I have a secure websocket server based on the Qt example:
> 
> https://doc.qt.io/qt-6/qtwebsockets-sslechoserver-example.html
> 
> It requires a certificate and a key which are compiled into the server and it 
> functions well.
> 
> However, whenever the certificate expires (such as Let’s encrypt after 90 
> days) I need to recompile the server with the renewed certificate.
> 
> In order to avoid this process I wonder if it is possible to somehow 
> externally point to the the new certificates without integration at 
> compilation time.
> 
> Thanks for any hint,
> best
> 
> Alex
> 
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest



signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] running Qt main event loop in secondary thread

2023-03-28 Thread Samuel Gaist via Interest
On lundi, 27 mars 2023 22.23:02 h CEST Stefan Seefeld wrote:
> Hello,
> 
> I'm working on some Python tests that interact with a Qt application. I
> would like to run the application's event loop in a secondary thread, so
> the primary thread can perform the test itself.
> 
> I read in the past that such a use-case wasn't supported by Qt, but I can't
> find that information right now, and neither do I remember the rationale
> for that limitation.
> 
> Could anybody please either confirm or deny this limitation, ideally with
> some background information ?
> 
> For context: my application is somewhat atypical in that the application
> only has a minimal GUI, but does a lot of processing of input from TCP/IP.
> The test logic I'd like to write would thus have test function (running in
> the primary thread) control the data sent to the app and inspect and assert
> the application's corresponding states, while the event processing would
> take place in a secondary thread.
> 
> I'm unfortunately not sure that such a use-case is possible at all, i.e. I
> may have to invert roles, i.e. have the actual "test scenario" be executed
> in a secondary thread as the main thread is reserved for the (blocking)
> event loop.
> 
> Thanks for any information & suggestions !
> 
>   ...ich hab' noch einen Koffer in Berlin...


Hi,

Did you consider the use of pytest-qt[0] ? 

It allows to test the various aspects of your widgets and other Qt based 
business logic without having to manage yourself the creation of a 
QApplication object or the need to add threads.

Best regards

Samuel

[0]https://pytest-qt.readthedocs.io/en/latest/intro.html


signature.asc
Description: This is a digitally signed message part.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Official linuxdeployqt ?

2022-08-04 Thread Samuel Gaist via Interest

> On 4 Aug 2022, at 19:42, Scott Bloom  wrote:
> 
> Is there a Qt supported linuxdeployqt comparable to the windeployqt?
> 
> I found the 3rd party version, but the command line args are very different.
> 
> Also, is anyone on the Qt side, create a CMake function for this?
> 
> Where inside CMake, you could call “DeployQt(  )” and it would find 
> all the dependencies and create a list of files in cmake etc
> 
> Scott
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

Hi Scott,

I can’t answer for the former but for the latter I had some WIP for macdeployqt 
that you can find here:

https://codereview.qt-project.org/c/qt/qttools/+/182317

I should revisit that but in the mean time it might already help.

Cheers

Samuel


signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


interest@qt-project.org

2020-10-19 Thread Samuel Gaist via Interest


> On 19 Oct 2020, at 10:32, coroberti  wrote:
> 
> Hi,
> Documentation for Qt-5.12 refers to two "activated" signals:
> https://doc.qt.io/qt-5.12/qcombobox.htm
> void activated(int index)
> void activated(const QString &text)
> 
> Documentation for Qt-5.15 refers to only one of them
> https://doc.qt.io/qt-5/qcombobox.html
> void activated(int index)
> 
> Was the signal removed for some reason?
> Thanks.
> 
> Kind regards,
> Robert Iakobashvili
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
Hi,

Yes it has been.

You can find it in https://doc.qt.io/qt-5/qcombobox-obsolete.html

And related to that https://bugreports.qt.io/browse/QTBUG-81845

Best regards

Samuel



signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 6 Sourcecode

2020-09-18 Thread Samuel Gaist via Interest
Hi,

It’s currently the dev branch and it is what you get by default when you clone 
the qt5 super module or any of the other modules.

Best regards

Samuel

> On 18 Sep 2020, at 10:54, Nibedit Dey  wrote:
> 
> Dear friends,
> 
> I want to look into the source code of the ongoing Qt 6 development.
> But I couldn't find the 6.0.0 branch. Can anyone point to the repository?
> Is there a Qt 6 super module like the one for Qt 5?
> e.g.:- https://github.com/qt/qt5.git
> 
> Please let me know.
> 
> Best Regards,
> Nibedit
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest




signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to get macdeployqt to ship QtSpeech plugin?

2019-02-12 Thread Samuel Gaist
On 12 Feb 2019, at 18:05, Vadim Peretokin  wrote:
> 
> Hi!
> 
> How can I get Qt 5.12 macdeployqt to include QtSpeech plugin in the 
> distribution? My project makes use of it, QtSpeech plugin is available in the 
> Qt installation, but yet it is not getting added to the application.
> 
> Thanks,
> Vadim.
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

Hi,

You have to apply this patch:

https://codereview.qt-project.org/#/c/253094/

and build macdeployqt (nothing else is needed)

Best regards

Samuel
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Singleton application

2018-04-17 Thread Samuel Gaist

> On 17 Apr 2018, at 12:33, Hamish Moffatt  wrote:
> 
> Is there any support built-in for making an application a singleton (ie you 
> can't launch multiple instances), or does anyone have a recipe?
> 
> I'd actually like a second launch to signal the first, passing on any 
> parameters, much like the web browsers do. (eg link clicked from an 
> application creates new tab in existing browser instance.).
> 
> I need this to work on Windows and Mac.
> 
> 
> Hamish
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


Hi,

Just in case, the qtsolution module is available at 
http://code.qt.io/cgit/qt-solutions/qt-solutions.git/ with build fixes for Qt 5.

The QtSingleApplication module is working with Qt 5. However it doesn’t provide 
support for QGuiApplication but it’s not hard to add it if needed.

Cheers
Samuel


signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt for Windows & openssl

2017-07-13 Thread Samuel Gaist

> On 13 Jul 2017, at 14:44, Alexander Ivash  wrote:
> 
> Is there are reasons for not including openssl libraries into Qt
> binary packages?
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

Yes there are: licensing and export restrictions.

See http://doc.qt.io/qt-5/deployment.html#licensing

Cheers,
Samuel


signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Using Widgets for new projects

2017-05-17 Thread Samuel Gaist

> On 17 May 2017, at 18:45, Benjamin TERRIER  wrote:
> 
> 2017-05-17 18:14 GMT+02:00 Jérôme Godbout :
>> I don't say all desktop application should be done into Qml, but just that
>> it's doable into Qml no matter the application you have.
> 
> No, it is not always doable.
> 
> Let's say I want to make a desktop app that looks native.
> If I want to do it with QtQuick, I will have to use QtQuick Controls
> 1, but they have
> poor performances and do not support keyboard focus correctly (QTBUG-47658).
> So I am stuck with widgets.
> 
> Also few weeks ago I made a desktop app which embed a video player.
> I started by developing it with Qt Quick and Qt Multimedia, but
> because of QTBUG-53019
> it does not work well on some AMD hardware.
> From there I add 2 choices: switch to widgets or use another backend like vlc.
> But vlc needs a HWND to render into and you cannot get one with Qt Quick.
> In the end I rewrote the app with widgets.
> 
> Finally, in some cases, you might find yourself limited when using
> QtQuick as you do
> not have access to the scenegraph (most classes are private). On the other 
> hand
> you have full access to QPainter and can draw whatever you want (even
> bezier curves).
> (I know you can do the same with canvas and QPaintedItem, but you loose a lot 
> of
> what QML and the scenegraph offer)
> 
> BR,
> 
> Benjamin
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 

Hi Benjamin,

Not directly related to the conversation at hand but since you are interested 
by VLC, you’ll likely want to take a look at the VLC-Qt project:

https://vlc-qt.tano.si

Regards,
Samuel



signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Is there a way to simulate serial port data?

2017-03-27 Thread Samuel Gaist

> On 28 Mar 2017, at 00:48, Murphy, Sean  wrote:
> 
> I've got a class that inherits from QSerialPort. The bulk of the code in the 
> class is parsing that I'm doing in a slot that is connected to QSerialPort's 
> readyRead() signal. I want to inject known data  into this class as if it's 
> actually coming across the serial port to validate my parsing code, is there 
> any way to do that? Ideally I'd be able to write data in and have it trigger 
> the readyRead() signal, but I'm not seeing any way to do that.
> 
> I know I could write a separate application that writes out one serial port, 
> and then I could cable that back to my other serial port, but I was just 
> looking for a way to do it all in code.
> 
> Sean
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

What about writing a “virtual serial port” ?

QSerialPort is a QIODevice, so one thing you can do is to replace it with a 
custom QIODevice where you can write what you from e.g. a “console widget” to 
evaluate what you want from your application.

Cheers
Samuel


signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML async/await support?

2017-02-02 Thread Samuel Gaist

> On 2 Feb 2017, at 18:02, Jason H  wrote:
> 
> When will QML get proper async/await support? I'm not using Promises, since 
> my callback hell is manageable, but I do look forward to async/await.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

Looking for something like https://github.com/benlau/quickpromise ?

Regards,
Samuel


signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.7+ and Command+Shift shortcuts on Mac

2017-01-08 Thread Samuel Gaist

> On 8 Jan 2017, at 19:09, René J.V. Bertin  wrote:
> 
> So...
> 
> It seems we are indeed looking at a Qt regression.
> 
> https://github.com/RJVB/shortcut-test-qt5
> 
> 
> That's an adapted version of Qt's menus example which adds a shortcut test 
> action with a configurable shortcut string and commandline options to add it 
> to the menubar and/or the context menu, plus an option NOT to use the native 
> menubar.
> 
> I cannot get shortcuts like Ctrl+! but also Meta+! (resp. Command+! and 
> Ctrl+! on Mac) to work unless the action is a menuitem in the native menubar.
> 
> That's with Qt 5.7.1; with Qt 5.6.2 they work as expected.
> 
> Writing them as Ctrl+Shift+1 or Meta+Shift+1 makes them work, but that's not 
> really a nice solution...
> 
> Is there anyone who can try the above example with Qt 5.7.1 or newer, 
> possibly compare it to Qt 5.6?
> 
> Thanks!
> 
> 


Hi,

https://bugreports.qt.io/browse/QTBUG-57990 is about a similar problem for 
Ubuntu.

Coming from this https://forum.qt.io/topic/74872/ forum thread.

5.7.0 works correctly for him but not 5.7.1

Regards
Samuel


signature.asc
Description: Message signed with OpenPGP
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Compiing Qt 5.7.1 for iOS, with iPhoneOS10.2.sdk

2016-12-22 Thread Samuel Gaist

> On 22 Dec 2016, at 16:05, Jason H  wrote:
> 
> ../qt-everywhere-enterprise-src-5.7.1/configure -v -xplatform macx-ios-clang
> clang: warning: no such sysroot directory: 
> '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk'
> 
> I don't have iPhoneOS10.1.sdk, but I do have a iPhoneOS10.2.sdk
> 
> What can be done to make the compile work? Can Qt's configure script be more 
> flexible?
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


Hi,

It’s already flexible, add -sdk iphoneos10.2 to your configure line.

If you are re-building after an Xcode update don’t just calle rm ./ -rf in your 
build folder you’ll miss hidden files. Nuke it completely and re-create a new 
one.

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


Re: [Interest] configuring qt from cmake fails

2016-12-15 Thread Samuel Gaist

> On 15 Dec 2016, at 20:15, Fabian Wein  wrote:
> 
>>> So patching qt such that the options „-headerpad_max_install_names
>>> -stdlib=libc++“ are used for linking would be just fine for me.
>> 
>> You have to pass -stdlib=libc++.
> 
> I know this, but how?
> 

Hi,

add_compile_options(-stdlib=libc++)

Requires cmake >= 3

Samuel

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


Re: [Interest] macdeploy and lib dependencies

2016-10-09 Thread Samuel Gaist

> On 9 oct. 2016, at 12:27, Nuno Santos  wrote:
> 
> Hi,
> 
> I’m linking my app with a lib that has other dependencies. While macdeployqt 
> is able to copy and rename the main lib file, it isn’t able to do it for it’s 
> dependencies. This is causing the bundle to have system dependencies. How can 
> one trick macdeployqt to do the same for the lib dependencies? Renaming libs 
> by hand is a tedious job and I always tend to avoid it. Any ideas?
> 
> Thanks!
> 
> Regards,
> 
> Nuno
> 

Hi,

What do you mean by “system dependencies” ? Cocoa, Foundation and the like ?

If so those are normal dependencies that you don’t need to worry about.

If not, please share what dependencies you have trouble with.

Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] 10.12 SDK breaks qt5-qtconnectivity build (on 10.11)

2016-10-02 Thread Samuel Gaist

> On 2 oct. 2016, at 14:04, René J.V. Bertin  wrote:
> 
> On Sunday October 02 2016 12:14:05 Samuel Gaist wrote:
> 
> Hi Samuel,
> 
>> I did too but I haven’t had the time to do a thorough analysis of what has 
>> changed exactly from 10.11 to 10.12 however if interested I have a small 
>> patch that adds the missing imports/includes where needed. It might need 
>> some cleanup though.
> 
> Yes, please, by all means post the patch or a pointer to it.
> Do you know if it is safe to apply unconditionally, i.e. also for earlier Mac 
> OS versions/SDKs?
> 
> Thanks,
> René
> 

I don’t have the older SDK at hand to test that so I have protected the new 
includes with SDK checks.

See here:
https://codereview.qt-project.org/#/c/172619/

Best regards
Samuel


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] 10.12 SDK breaks qt5-qtconnectivity build (on 10.11)

2016-10-02 Thread Samuel Gaist
Hi,

I did too but I haven’t had the time to do a thorough analysis of what has 
changed exactly from 10.11 to 10.12 however if interested I have a small patch 
that adds the missing imports/includes where needed. It might need some cleanup 
though.

Samuel

> On 2 oct. 2016, at 11:36, René J.V. Bertin  wrote:
> 
> Hi,
> 
> Xcode 8 installs (only) the 10.12SDK even on Mac OS 10.11, which leads to a 
> build failure in QtConnectivity:
> 
> https://trac.macports.org/ticket/52203
> 
> Extract:
> /usr/bin/clang++ -c -pipe -stdlib=libc++ -stdlib=libc++ -O2 -std=c++1z 
> -isysroot 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
>  -mmacosx-version-min=10.11 -fvisibility=hidden -fvisibility-inlines-hidden 
> -fno-exceptions -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV 
> -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_OSX_BLUETOOTH -DQT_BUILD_BLUETOOTH_LIB 
> -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS 
> -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS 
> -DQT_DISABLE_DEPRECATED_BEFORE=0x05 -DQT_NO_EXCEPTIONS 
> -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB 
> -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I../../include 
> -I../../include/QtBluetooth -I../../include/QtBluetooth/5.6.1 
> -I../../include/QtBluetooth/5.6.1/QtBluetooth 
> -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers 
> -I/opt/local/libexec/qt5/lib/QtConcurrent.framework/Headers -I.moc 
> -I/opt/local/libexec/qt5/mkspecs/macx-clang
>  -F/opt/local/libexec/qt5/lib -o .obj/osxbtutility.o osx/osxbtutility.mm
> osx/osxbtutility.mm:171:14: error: property 'data' cannot be found in forward 
> class object 'CBUUID'
>if (uuid.data.length == 2) {
> ^
> osx/osxbtutility_p.h:58:8: note: forward declaration of class here
> @class CBUUID;
>   ^
> 
> Has anyone else seen this? I'm not seeing any bug reports about this on 
> qt.io; could it be that it has to do with configure options we use for 
> MacPorts?
> 
> R.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML Map Provider MapQuest has disabled direct access

2016-07-16 Thread Samuel Gaist

On 13 juil. 2016, at 11:22, Adrian Jäkel  wrote:

> Hi,
> 
> since Monday, July 11, 2016, the direct tile access to MapQuest legacy maps 
> has been stopped. See [1].
> 
> Is it correct that there are now no out of the box usable map provider 
> plugins?
> 
> MapQuest now offers a "free" plan for which you need to register. Has anyone 
> tried to adapt the osm plugin to be usable with mapquest credentials?
> 
> Since my company already pays for a google maps api licence it seems heavy 
> unnecessary to also pay MapQuest if we exceed there 15.000 transaction/month 
> in the free plan. Has anyone tried to write a provider plugin for google maps 
> or has anyone had any success in using the native Android MapView/MapFragment 
> as well as iOS MapKit alongside QML in their App?
> 
> Regards,
> Adrian Jäkel
> 
> [1] 
> http://devblog.mapquest.com/2016/06/15/modernization-of-mapquest-results-in-changes-to-open-tile-access/
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 

Hi,

There's a forum member that created a Google Map backend available on Github

https://github.com/vladest/googlemaps

Note: I haven't tested it.

I've suggested him to submit it for review but I don't know if he did.

Hope it helps

Samuel


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Is there any plan to make property binding working in C++?

2016-05-09 Thread Samuel Gaist

On 9 mai 2016, at 10:32, Jean-Michaël Celerier  
wrote:

> 
> On Mon, May 9, 2016 at 7:41 AM, Thiago Macieira  
> wrote:
> 
> We already have one, it's called QObject::connect.
> 
> To be faire, to emulate property binding, I think that you also have to set 
> the current value upon connection.
> Which isn't straightforward if you want to do more than a trivial "set" 
> operation :
> 
> connect(model, &Model::fooChanged,
>  this, [=] (Foo f) { this->view->setHeight(toPixels(f)); }
> 
> this->view->setHeight(toPixels(model.foo()));
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

There's was an interesting article about this from Olivier Goffart:

https://woboq.com/blog/property-bindings-in-cpp.html

Just repeating the warning here: it's not production code

Cheers
Samuel


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] jpeg 2000

2016-04-14 Thread Samuel Gaist

On 14 avr. 2016, at 21:15, maitai  wrote:

> Hello,
> 
> Does anyone knows if qt jpeg2000 implementation is based on Jasper or 
> openJpeg or something specific to qt, and if it implies extra libs? I need to 
> decode weather gribs (stored as jpeg 2000 image in gray scale), I have 
> several working solutions using either Jasper or others but would like to 
> know if I stand a chance to do the same with a pure qt solution.
> 
> Thanks
> Philippe Lelong

Hi,

The plugin uses Jasper.

You can get more information from the qtimageformats module: 
http://code.qt.io/cgit/qt/qtimageformats.git/

Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread Samuel Gaist

On 17 mars 2016, at 16:36, René J.V. Bertin  wrote:

> Hi,
> 
> I'm running into an issue building Qt 5.6.0 on OS X 10.9.5 :
> 
> gmake[3]: Entering directory 
> '/.../qt5-kde-devel/work/build/qtbase/src/tools/bootstrap'
> /usr/bin/clang++ -c -O3 -march=native -g -ffunction-sections -O2 -g -fPIC 
> -std=c++11 -isysroot 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
>  -mmacosx-version-min=10.7 -fno-exceptions -Wall -W -DQT_NO_MTDEV 
> -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT 
> -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS 
> -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE 
> -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE 
> -DQT_NO_DEPRECATED -DQT_NO_TRANSLATION -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 
> -DQT_NO_CAST_FROM_ASCII -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT 
> -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER 
> -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x05 
> -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG 
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/tools/bootstrap
>  -I. -I/Users/bertin/work/s
> rc/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include 
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml/5.6.0
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml/5.6.0/QtXml
>  -I../../../include -I../../../include/QtCore 
> -I/.../qt5-kde-devel/work/build/qtbase/include/QtXml 
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/macx-clang
>  -o .obj/qlatincodec.o 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec.cpp
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec.cpp:34:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec_p.h:48:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qtextcodec.h:1:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/codecs/qtextcodec.h:37:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qstring.h:1:
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:756:55:
>  error: no type named 'u16string' in namespace 'std'
>static inline QString fromStdU16String(const std::u16string &s);
> ~^
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:757:17:
>  error: no type named 'u16string' in namespace 'std'
>inline std::u16string toStdU16String() const;
>   ~^
> 
> In file included from 
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qhashfunctions.h:39:
> In file included from 
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qpair.h:1:
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qpair.h:62:44:
>  error: no member named 'declval' in namespace 'std'
>Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval() = p.first) && 
> noexcept(std::declval() = p.second))
>  ~^
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/global/qcompilerdetection.h:1036:43:
>  note: expanded from macro 'Q_DECL_NOEXCEPT_EXPR'
> # define Q_DECL_NOEXCEPT_EXPR(x) noexcept(x)
>  ^
> 
> 
> 
> This does not appear to be a limitation in the Xcode compiler (Xcode 6.2, 
> Apple Clang 600) because when I use clang 3.8 I get the exact same errors.
> 
> Configure command and summary are below (note the request for the 10.9 SDK 
> which is ignored in the above compile command!).
> 
> Any ideas? The same code in qstring.h doesn't cause issues in Qt 5.5.1 .
> 
> %> configure -top-level -platform macx-clang -sdk macosx10.9 -prefix 
> /opt/local -archdatadir /opt/local/libexec/qt5 -docdir 
> /opt/l

Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread Samuel Gaist
On 18 mars 2016, at 08:57, BOUCARD Olivier  wrote:

> Hi,
> 
> Is it possible to manually select a mirror and to force the Maintenance Tool 
> to use it?
> Because I'm in Cyprus which for dumb reason is considered in Asia??? So I'm 
> connected to some mirror in China from where I get 5Kbps download speed.
> Please also fix this issue, Linux distros are able to select a proper mirror 
> so you can do it too.
> I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
> 
> Thank you
> 
> PS: BTW I have the same issue on the qt.io website when I download but at 
> least here I have the possibility to manually select another mirror.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You can use the QtSdkRepoChooser for the maintenance tool:

https://github.com/JKSH/QtSdkRepoChooser

Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qt.labs.controls Material Toasts

2016-02-15 Thread Samuel Gaist
Hi,

Ok, I see what you mean :)

I was asking because I've started some time ago to implement (early WIP) a 
pluggable notification system for Qt so I was wondering if it could benefit to 
these custom notifications.

If interested, you can take a look at 
https://codereview.qt-project.org/#/c/97068/

It's not ready yet but the more inputs the better :)

Samuel

On 12 févr. 2016, at 16:17, Nurmi J-P  wrote:

> Hi Samuel,
> 
> We’ll probably leave the native notification system integration job to the 
> platform extras or other modules. The new controls are built upon so called 
> Qt Quick templates, and the whole styling system is heavily based on Qt 
> Quick. They are all fully cross-platform styles implementing specific design 
> languages. They are not pretending to be native styles, because there’s 
> actually nothing native there. Bridging native controls doesn’t fit very well 
> into the picture of this project. If we wanted to go native, direct QML 
> bindings to native controls would be my preferred solution. It would be a 
> parallel offering, not mixed with Qt Quick. :)
> 
> --
> J-P Nurmi
> 
> 
> 
>> On 12 Feb 2016, at 13:50, Samuel Gaist  wrote:
>> 
>> Hi,
>> 
>> Out of curiosity, should that be driven by the OS notification system ?
>> 
>> Samuel
>> 
>> On 11 févr. 2016, at 16:45, Nurmi J-P  wrote:
>> 
>>> Hi,
>>> 
>>> We would definitely like to extend our offering with some sort of tooltips 
>>> and notification banners in the future. We might prefer stick to the 
>>> terminology Qt and Qt Quick have used in the past, so we probably won’t end 
>>> up calling them snackbars, toasts, or anything else as delicious, though. :)
>>> 
>>> I have filed suggestions for both so they don’t get forgotten:
>>> -  https://bugreports.qt.io/browse/QTBUG-51003
>>> -  https://bugreports.qt.io/browse/QTBUG-51060
>>> 
>>> --
>>> J-P Nurmi
>>> 
>>> From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of ekke
>>> Sent: Thursday, February 11, 2016 10:47
>>> To: interest@qt-project.org
>>> Subject: Re: [Interest] qt.labs.controls Material Toasts
>>> 
>>> sorry, was an old link - this one is the actual one:
>>> https://www.google.com/design/spec/components/snackbars-toasts.html
>>> 
>>> Am 11.02.16 um 10:39 schrieb ekke:
>>> Hi,
>>> 
>>> are there any plans to provide Snackbars and Toasts out of the box ?
>>> http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html
>>> 
>>> or do I have to implement them by trying to customize existing controls ?
>>> 
>>> thx
>>> --
>>> ekke (ekkehard gentz)
>>> 
>>> independent software architect
>>> international development native mobile business apps
>>> BlackBerry 10 | Qt Mobile (Android, iOS)
>>> workshops - trainings - bootcamps
>>> 
>>> BlackBerry Elite Developer
>>> BlackBerry Platinum Enterprise Partner
>>> 
>>> max-josefs-platz 30, D-83022 rosenheim, germany
>>> mailto:e...@ekkes-corner.org
>>> blog: http://ekkes-corner.org
>>> apps and more: http://appbus.org
>>> 
>>> twitter: @ekkescorner
>>> skype: ekkes-corner
>>> LinkedIn: http://linkedin.com/in/ekkehard/
>>> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490
>>> 
>>> 
>>> 
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>> 
>>> 
>>> --
>>> ekke (ekkehard gentz)
>>> 
>>> independent software architect
>>> international development native mobile business apps
>>> BlackBerry 10 | Qt Mobile (Android, iOS)
>>> workshops - trainings - bootcamps
>>> 
>>> BlackBerry Elite Developer
>>> BlackBerry Platinum Enterprise Partner
>>> 
>>> max-josefs-platz 30, D-83022 rosenheim, germany
>>> mailto:e...@ekkes-corner.org
>>> blog: http://ekkes-corner.org
>>> apps and more: http://appbus.org
>>> 
>>> twitter: @ekkescorner
>>> skype: ekkes-corner
>>> LinkedIn: http://linkedin.com/in/ekkehard/
>>> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qt.labs.controls Material Toasts

2016-02-12 Thread Samuel Gaist
Hi,

Out of curiosity, should that be driven by the OS notification system ?

Samuel

On 11 févr. 2016, at 16:45, Nurmi J-P  wrote:

> Hi,
> 
> We would definitely like to extend our offering with some sort of tooltips 
> and notification banners in the future. We might prefer stick to the 
> terminology Qt and Qt Quick have used in the past, so we probably won’t end 
> up calling them snackbars, toasts, or anything else as delicious, though. :)
> 
> I have filed suggestions for both so they don’t get forgotten:
> -  https://bugreports.qt.io/browse/QTBUG-51003
> -  https://bugreports.qt.io/browse/QTBUG-51060
> 
> --
> J-P Nurmi
> 
> From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of ekke
> Sent: Thursday, February 11, 2016 10:47
> To: interest@qt-project.org
> Subject: Re: [Interest] qt.labs.controls Material Toasts
> 
> sorry, was an old link - this one is the actual one:
> https://www.google.com/design/spec/components/snackbars-toasts.html
> 
> Am 11.02.16 um 10:39 schrieb ekke:
> Hi,
> 
> are there any plans to provide Snackbars and Toasts out of the box ?
> http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html
> 
> or do I have to implement them by trying to customize existing controls ?
> 
> thx
> --
> ekke (ekkehard gentz)
> 
> independent software architect
> international development native mobile business apps
> BlackBerry 10 | Qt Mobile (Android, iOS)
> workshops - trainings - bootcamps
> 
> BlackBerry Elite Developer
> BlackBerry Platinum Enterprise Partner
> 
> max-josefs-platz 30, D-83022 rosenheim, germany
> mailto:e...@ekkes-corner.org
> blog: http://ekkes-corner.org
> apps and more: http://appbus.org
> 
> twitter: @ekkescorner
> skype: ekkes-corner
> LinkedIn: http://linkedin.com/in/ekkehard/
> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 
> 
> --
> ekke (ekkehard gentz)
> 
> independent software architect
> international development native mobile business apps
> BlackBerry 10 | Qt Mobile (Android, iOS)
> workshops - trainings - bootcamps
> 
> BlackBerry Elite Developer
> BlackBerry Platinum Enterprise Partner
> 
> max-josefs-platz 30, D-83022 rosenheim, germany
> mailto:e...@ekkes-corner.org
> blog: http://ekkes-corner.org
> apps and more: http://appbus.org
> 
> twitter: @ekkescorner
> skype: ekkes-corner
> LinkedIn: http://linkedin.com/in/ekkehard/
> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Video file generation from Qt application, other than FFmpeg

2016-01-21 Thread Samuel Gaist

On 21 janv. 2016, at 21:15, Phil Weinstein  wrote:

> We will not be able to use the FFmpeg library for video generation from our 
> Qt application. Are there any other tools/products usable with Qt which can 
> do basic generation of video files, given a sequence of QImages or QPixmaps? 
> We don't need audio with the video.
> 
> (Sorry for the repost. My original message went deep into a completely 
> unrelated thread).

Hi,

Out of curiosity, why can't you use ffmpeg ?

There's VLClib that you can use but it's also ffmpeg based so it could be 
problematic.

OpenCV can also create video files.

Hope it helps
Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] functioning link to 5.4.2 source tar?

2015-12-15 Thread Samuel Gaist
On 15 déc. 2015, at 14:31, Roland Hughes  wrote:

> All,
> 
> Is there still a functioning link to a 5.4.2 source tar out there? Other than 
> cloning from Git I mean. If possible I would like to remain at 5.4.2 to fix 
> one little thing which requires me to build qt from source for MP4 support. I 
> could move to 5.5.1, but...requires changing a lot of existing scripts, etc.
> 
> Thanks,
> 
> --
> Roland Hughes, President
> Logikal Solutions
> 
> http://www.theminimumyouneedtoknow.com
> http://www.infiniteexposure.net
> http://www.johnsmith-book.com
> http://www.logikalblog.com
> 

Hi,

You can find it there:

http://download.qt.io/official_releases/qt/5.4/5.4.2/single/

Cheers
Samuel





signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Good way to track down "QCoreApplication::postEvent: Unexpected null receiver"

2015-12-06 Thread Samuel Gaist
Hi,

That usually occurs when you are calling deleteLater on a null QObject.

First thing I'd check are delete and deleteLater statements of QObject derived 
class.

Cheers

Samuel

On 6 déc. 2015, at 19:44, Bob Hood  wrote:

> I'm getting this warning/error, but it's pretty nebulous in terms of where 
> exactly it is occurring.  Is there some kind of debug switch I can enable to 
> get move verbose output when this occurs, perhaps something that would help 
> me pinpoint the culprit?
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Subclassing QNetworkAccessManager not working

2015-11-03 Thread Samuel Gaist

On 3 nov. 2015, at 16:51, "Jason H"  wrote:

> I am experimenting with creating my own scheme. Per the documentation at 
> http://doc.qt.io/qt-5/qnetworkaccessmanager.html#supportedSchemes I am to 
> provide a protected slot, which will be hooked up by the MOC. However I am 
> only ever getting the default implementation:
> I got:
> ("ftp", "file", "qrc", "http", "https", "data")
> I expected:
> ("aes")
> 
> Also, what's this "data" scheme it supports?
> 
> [Please no comments about using HTTPS, I'm already using HTTPS where 
> appropriate]
> 
> #include 
> 
> class EncryptingNetworkManager: public QNetworkAccessManager {
> public:
>   EncryptingNetworkManager(QObject *parent = 0) : 
> QNetworkAccessManager(parent)
>   {
>   }
> 
> protected slots:
>   QStringList supportedSchemesImplementation() {
>   QStringList schemes;
>   schemes.push_back("aes");
>   return schemes;
>   }
> };
> 
> int main(int argc, char *argv[])
> {
>   EncryptingNetworkManager enm;
>   qDebug() << enm.supportedSchemes();
> ...
> 
> }
> 
> --
> Thanks
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You have a signature error: it's a const method

Cheers
Samuel


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to set iOS deployment target ?

2015-10-28 Thread Samuel Gaist

On 28 oct. 2015, at 12:26, Gian Maxera  wrote:

> Hello,
> I have to set up the minimum deployment target to iOS 7.0 … how can I set up 
> this into .pro ?
> 
> Ciao,
> Gianluca.
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 


Hi,

QMAKE_IOS_DEPLOYMENT_TARGET = 7.0

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


Re: [Interest] QMYSQL driver not loaded!

2015-10-27 Thread Samuel Gaist via Interest

On 27 oct. 2015, at 09:28, HPC-TECH via Interest  
wrote:

> Hi,
> 
> I'm unable to run any application uses MySQL plugin (whether from Qt Creator 
> or outside it) because of the following error message:
>> QSqlDatabase: QMYSQL driver not loaded
>> QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
> I'm using:
>   • Qt 5.5.1
>   • Qt Creator 3.5.1
>   • Linux Mint xfce x64
> You can preview the full log (created by QT_DEBUG_PLUGINS=1):
> https://pastebin.kde.org/ps06nig6x
> 
> -- 
> Best Regards,
> HPC-TECH
> Skype: hpc-tech
> Telegram: hpc_tech
> Website: 
> http://hpc-tech.com/

Hi,

Line 221: It seems you are missing libssl.so.10

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


Re: [Interest] Qt 5.5.x

2015-09-12 Thread Samuel Gaist

> On 12 sept. 2015, at 10:19, Till Oliver Knoll  
> wrote:
> 
> 
>> Am 11.09.2015 um 19:59 schrieb Matthew Woehlke :
>> 
>>> On 2015-09-11 13:41, Till Oliver Knoll wrote:
>>> You can further reduce the "dependency tree" of your sources by 
>>> making use of the private "d-pointer" pattern (there is a name for
>>> it which currently escapes me)
>> 
>> PIMPL? ;-)
>> 
>> https://en.wikipedia.org/wiki/Pimpl
> 
> Exactly :) Even though I had the term "Cheshire Cat" in mind :) (I yet have 
> to google why that pattern is named after a cat).
> 
> But while we're there, quoting from that article:
> 
> "One type of opaque pointer commonly used in C++ class declarations is the 
> d-pointer. The d-pointer is the only private data member of the class and 
> points to an instance of a struct. Named by Arnt Gulbrandsen of Trolltech, 
> this method allows class declarations to omit private data members, except 
> for the d-pointer itself.[6] The result: (a) more of the class implementation 
> is hidden from view; (b) adding new data members to the private struct does 
> not affect binary compatibility; (c) the header file containing the class 
> declaration only needs to #include those other files needed for the class 
> interface, rather than for its implementation. One side benefit is that 
> compilations are faster because the header file changes less often. The 
> d-pointer is heavily used in the Qt and KDE libraries."
> 
> 
> Couldn't have explained it better :) Oh and yes, Trolltech is the initial 
> company(*) that brought us Qt! ;)
> 
> Cheers,
>   Oliver
> 
> 
> (*) IIRC they did have (slightly) different names before that
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

Because the d pointer is the equivalent of the smile of the Cheshire Cat, the 
only visible part: d => D

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


Re: [Interest] Windows deployment. Failed to start because of missing platform plugin...

2015-08-28 Thread Samuel Gaist

On 28 août 2015, at 15:20, Bo Thorsen  wrote:

> Den 28-08-2015 kl. 10:01 skrev Igor Mironchik:
>> I'm trying to deploy Qt Windows application. And it failed to start with
>> the next message...
>> 
>> This application failed to start because it could not find or load the
>> Qt platform plugin "windows".
>> 
>> Reinstalling the application may fix this problem.
>> 
>> Platform plugin is exist in ./platforms/qwindows.dll
> 
> It has to be in plugins/platforms/qwindows.dll.
> 
>> How can I solve this problem?
> 
> When I hit this, I copy every dll from Qt to my bin dir and every plugin 
> to the plugins dir. If that runs, then you can start deleting stuff and 
> see if your application still runs.
> 
> For example, I have this:
> 
> C:\Prog..\VikingSoftware\Pokerformance\
>   pokerformance.exe
>   Qt5Core.dll
>   Qt5Gui.dll
>   Qt5Network.dll
>   Qt5Sql.dll
>   Qt5Widgets.dll
>   plugins\
> platforms\
>   qwindows.dll
> sqldrivers\
>   qsqlite.dll
> 
> This works for me with Qt 5.5.
> 
> I hope this helps.
> 
> Bo Thorsen,
> Director, Viking Software.
> 
> -- 
> Viking Software
> Qt and C++ developers for hire
> http://www.vikingsoft.eu
> 

Hi,

There's also windeployqt that can help for that matters

Cheers
Samuel

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


Re: [Interest] Qt 5.5.1 & MSVC 2015

2015-08-27 Thread Samuel Gaist
Hi,

Do you have python in your PATH ? IIRC, missing it a configuration time 
triggers that one

Hope it helps

On 27 août 2015, at 20:03, mark diener  wrote:

> Oops,
> 
> I forgot the latest build errors, this time in the java engine (Yarr parser?)
> 
> Each day, one less build blocker.
> 
> Generating Code...
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /BASE:0x6600 /INCREMENTAL:NO 
> /DLL /SUBSYSTEM:WINDOWS /VERSION:5.5 /MANIFEST:embed 
> /OUT:..\..\lib\Qt5Qml.dll @C:\Users\md\AppData\Local\Temp\nmB431.tmp
>Creating library ..\..\lib\Qt5Qml.lib and object ..\..\lib\Qt5Qml.exp
> YarrInterpreter.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::newlineCreate(void)" 
> (?newlineCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in function 
> "public: __thiscall JSC::Yarr::BytecodePattern::BytecodePattern(class 
> PassOwnPtr,class WTF::Vector OwnPtr,1,0> &,struct JSC::Yarr::YarrPattern 
> &,class WTF::BumpPointerAllocator *)" 
> (??0BytecodePattern@Yarr@JSC@@QAE@V?$PassOwnPtr@VByteDisjunction@Yarr@JSCAAV?$Vector@U?$OwnPtr@VByteDisjunction@Yarr@JSC$00$0A@@WTF@@AAUYarrPattern@12@PAVBumpPointerAllocator@5@@Z)
> YarrJIT.obj : error LNK2001: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::newlineCreate(void)" 
> (?newlineCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ)
> YarrPattern.obj : error LNK2001: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::newlineCreate(void)" 
> (?newlineCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ)
> YarrInterpreter.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::wordcharCreate(void)" 
> (?wordcharCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in function 
> "public: __thiscall JSC::Yarr::BytecodePattern::BytecodePattern(class 
> PassOwnPtr,class WTF::Vector OwnPtr,1,0> &,struct JSC::Yarr::YarrPattern 
> &,class WTF::BumpPointerAllocator *)" 
> (??0BytecodePattern@Yarr@JSC@@QAE@V?$PassOwnPtr@VByteDisjunction@Yarr@JSCAAV?$Vector@U?$OwnPtr@VByteDisjunction@Yarr@JSC$00$0A@@WTF@@AAUYarrPattern@12@PAVBumpPointerAllocator@5@@Z)
> YarrJIT.obj : error LNK2001: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::wordcharCreate(void)" 
> (?wordcharCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ)
> YarrPattern.obj : error LNK2001: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::wordcharCreate(void)" 
> (?wordcharCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ)
> YarrPattern.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::digitsCreate(void)" 
> (?digitsCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in function 
> "public: struct JSC::Yarr::CharacterClass * __thiscall 
> JSC::Yarr::YarrPattern::digitsCharacterClass(void)" 
> (?digitsCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ)
> YarrPattern.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::spacesCreate(void)" 
> (?spacesCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in function 
> "public: struct JSC::Yarr::CharacterClass * __thiscall 
> JSC::Yarr::YarrPattern::spacesCharacterClass(void)" 
> (?spacesCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ)
> YarrPattern.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::nondigitsCreate(void)" 
> (?nondigitsCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in function 
> "public: struct JSC::Yarr::CharacterClass * __thiscall 
> JSC::Yarr::YarrPattern::nondigitsCharacterClass(void)" 
> (?nondigitsCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ)
> YarrPattern.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::nonspacesCreate(void)" 
> (?nonspacesCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in function 
> "public: struct JSC::Yarr::CharacterClass * __thiscall 
> JSC::Yarr::YarrPattern::nonspacesCharacterClass(void)" 
> (?nonspacesCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ)
> YarrPattern.obj : error LNK2019: unresolved external symbol "struct 
> JSC::Yarr::CharacterClass * __cdecl JSC::Yarr::nonwordcharCreate(void)" 
> (?nonwordcharCreate@Yarr@JSC@@YAPAUCharacterClass@12@XZ) referenced in 
> function "public: struct JSC::Yarr::CharacterClass * __thiscall 
> JSC::Yarr::YarrPattern::nonwordcharCharacterClass(void)" 
> (?nonwordcharCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ)
> ..\..\lib\Qt5Qml.dll : fatal error LNK1120: 7 unresolved externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
> 14.0\VC\BIN\link.EXE"' : return code '0x460'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
> 14.0\VC\BIN\nmake.exe"' : return code '0x2

Re: [Interest] How to filter QFileSystemModel for use in QML

2015-08-17 Thread Samuel Gaist

On 17 août 2015, at 09:23, Rutledge Shawn  
wrote:

> 
> On 13 Aug 2015, at 14:14, Julius Bullinger  wrote:
> 
>> Dear list,
>> 
>> I'm having problems using QFileSystemModel in QML.
> 
> Have you tried FolderListModel?
> 
> 

Hi guys,

There's a catch when using QFileSystemModel + DelegateModel.

The model being populate asynchronously, it will trigger a layout changed 
sometimes after the QML stuff is ready. That will result in a full reset  which 
will clear the root index of DelegateModel.

The only workaround I've found currently is to use  onRootIndexChanged to set 
again the correct index

Hope it helps

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


Re: [Interest] moc code : incomplete type 'void' is not assignable

2015-07-23 Thread Samuel Gaist
On 23 juil. 2015, at 16:56, Jason H  wrote:

> I'm getting an error in moc-generated file, and I don't know why. 
> 
> error: incomplete type 'void' is not assignable
>case 1: *reinterpret_cast< void*>(_v) = _t->camera(); break;
>~ ^
> 
> The header file contains:
> #include 
> #include 
> class FlashControl : public QObject
> {
>   Q_OBJECT
>   QCamera *_camera;
> public:
> ...
>   Q_PROPERTY(void setCamera READ camera WRITE setCamera)
> 
> public slots:
> ...
>   void setCamera(QObject *qmlCamera);
>   QObject* camera();
> 
> 
> };
> 
> Does anyone have any ... pointers? (Sorry for the pun!)
> 


Hi,

Shouldn't your property type be QObject * ?

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


Re: [Interest] QML Inspector?

2015-06-26 Thread Samuel Gaist
Hi,

There's no such limitation, you can build it in 64bit.

Did you start your build from a amd64 or x86_amd64 cross-compiling console ?


On 26 juin 2015, at 21:04, Jérôme Godbout  wrote:

> I'm trying to compile GammaRay, anybody manage to compile it in x64 under 
> Windows?
> 
> I manage to compile VTK and set the proper env (VTK_DIR) against Qt 5 x64. I 
> couldn't compile Graphiz in x64 (complaining about missing header textspan.h, 
> manually give it to him, still cannot compile it in x64, the solution doesn't 
> work in VS2012). Even without Graphiz, the solution output by GammaRay cmake 
> doesn't have any x64 into. Even if I add the configuration for x64, I still 
> end up with many erros:
> Error 19  error LNK1112: module machine type 'x64' conflicts with target 
> machine type 'X86'   
> ...\build\tests\manual\x64\Release\wk2application.obj   1
> 
> I guess we are only suppose to compile GammaRay in 32 bits. Can we compile it 
> in x86 with Qt 5 x86 and run it to debug Qt 5 x64 after properly? We only 
> have a 64 bits version of ours app, we drop 32 bits support last years.
> 
> 
> 
> On Fri, Jun 26, 2015 at 9:33 AM, Jérôme Godbout  wrote:
> Hi,
> thanks all for your inputs, there's a few thing I was not aware of. For the 
> visualizer, I see little benefit in my use case in desktop, probably more 
> useful for embedded platform project which I think still have a real world 
> purpose.
> 
> As for GammaRay, it's slow down our application too much, we are doing 3D CAD 
> application with Qml (we have 3D scene render into texture and many many 
> objects into our Qml Tree, since the 3D objects are part of it as children to 
> our 3D viewport, yeah it's weird usage but make our application very 
> flexible). We tested GammaRay around summer years 2014 if I remember 
> correctly (2.1.0 I guess). It does the object inspection well, can edit, 
> invoke and emit was not working so well at the time, maybe they fixed it by 
> now. Singleton are not supported. But mainly, it make our application run 
> like it's in debug which is way too slow to our liking. Not sure if their was 
> any improvement on this, but for day to day work, it was not cutting it at 
> the time.
> 
> From the change log since my last eval (available here for those who are 
> looking for it, should realy put a link on the main page to this): 
> https://github.com/KDAB/GammaRay/releases
>   • Support displaying of QQmlListProperty contents.
>   • Fix invoking non-slot methods with arguments.
>   • Expose signal/slot spy callback API to plug-ins.
>   • Support for manually emitting signals, and improved method display.
>   • Fix crash when target deletes a signal sender in a slot.
> Seem like I should give it another spin. Our in house tool is doing this 
> without much slow down and can even perform invoke/emit/inspect/edit/regex 
> search on object based on ptr/name/id/type and clickable to navigate through 
> childs/parent. Wish we could license it open source, but I doubt we could do 
> that here :-(  Seem like maybe GammaRay have evolved enough so we can ditch 
> in-house implementation, will let the list known how it did go as soon as I 
> can have time to test the latest release.
> 
> I'm looking forward for that QtCreator items inspector, would love to see it 
> spin off of QtCreator and becoming a component on it's own, that would help 
> many people who are using other IDE. I was not aware of this one, thanks for 
> the info.
> 
> On a side note, I agree a Qml would need a TreeView, would remove our 
> dependencies on QWidgets for us.
> 
> 
> 
> 
> On Fri, Jun 26, 2015 at 6:33 AM, Rutledge Shawn 
>  wrote:
> 
> On 25 Jun 2015, at 21:41, Jérôme Godbout  wrote:
> 
> > There's GammaRay
> > http://www.kdab.com/kdab-products/gammaray/
> > https://github.com/KDAB/GammaRay
> >
> > It's not 100% efficient, but better then nothing. We end up doing our own 
> > debugger command line to search and inspect object along a TreeView from 
> > QWidgets to see/edit properties, pointer value, invoke methods and emit 
> > signal. I would love to see one build for Qml build-in, we could stop 
> > maintain ours.
> 
> https://codereview.qt-project.org/#/c/44322/ is a patch for qmlscene which 
> I’ve been occasionally developing and using for a long time (2012 or so).  
> Earlier versions looked at the object hierarchy (the QObject parent/child 
> relationship), whereas now it looks at the top-level Item’s childItems().  
> Each way has its advantages… There is a QAIM model and a QTreeView to view 
> the items and a few properties, and a “dump” button to get the rest.
> 
> However it’s not desirable to have a dependency on widgets in a QML tool.  
> (Although maybe having it in qmlscene wouldn’t be so bad, because we are 
> trying to deprecate qmlscene anyway.)  And it crashes sometimes, because the 
> tree does not automatically remove objects when they are destroyed, so it can 
> end up trying to get properties from 

Re: [Interest] Dynamically change dock icon under OS X

2015-04-15 Thread Samuel Gaist

On 15 avr. 2015, at 21:00, René J.V. Bertin  wrote:

> On Wednesday April 15 2015 11:40:37 Bob Hood wrote:
> 
>> Thanks, Oliver.  I'll see if I can track that down in the Creator code.  
>> You're likely right, it'll probably be Cocoa-specific.
> 
> Seems my message that also referred to Qt Creator never made it to the list.
> 
> You can also have a look at the systray example; it works just fine on OS X.
> 
> R.

Hi,

As for the dock icon, no need to go too deep in Qt Creator, you can take a look 
at http://doc.qt.io/qt-5/qtmac.html#setBadgeLabelText



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


Re: [Interest] What are the plans for moving https://gitorious.org/qt/qt3d.git

2015-03-18 Thread Samuel Gaist
Hi,

I'd go for 

https://code.qt.io/git/qt/qt3d.git

Cheers
Samuel


On 17 mars 2015, at 20:19, JR Cary  wrote:

> now that gitorius is going away.
> 
> Thanks.John Cary
> ___
> 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 Purchasing API - In app purchasing iOS not working on a release version deployed to the store.

2015-03-12 Thread Samuel Gaist
Hi guys,

Might be related to the DNS problems Apple experienced

http://arstechnica.com/apple/2015/03/apple-dns-error-responsible-for-ongoing-itunes-app-store-outages/

Samuel

On 12 mars 2015, at 14:02, Harri Pasanen  wrote:

> FYI, I'm currently experiencing something similar with a non-Qt iOS app.
> The new in-app items Apple approved last night are not visible, just an 
> old one.
> 
> I've been wondering if I had messed up something, but this sounds too 
> much like a co-incidence.
> 
> /Harri
> 
> On 12/03/2015 11:22, Nuno Santos wrote:
>>> On 12 Mar 2015, at 10:22, Nuno Santos  wrote:
>>> 
>>> Hi,
>>> 
>>> I hope so.
>>> 
>>> The thing is that my other app that is already on the store works perfectly 
>>> and prices are fetched…
>>> 
>>> Just wondering…
>>> 
 On 12 Mar 2015, at 10:20, Robert Iakobashvili  wrote:
 
 Hi Nuno,
 Could it be related to major availability glitch
 yesterday at App Store?
 
 Take care.
 Robert
 
 
 On Thu, Mar 12, 2015 at 12:16 PM, Nuno Santos  
 wrote:
> Hi,
> 
> I’m desparating a bit so i’m trying to gather all the information I can 
> about this.
> 
> I have developed an app for iOS and Android and I have used in app 
> purchasing. I have already done an app a couple of months ago with in app 
> purchases. It was deployed with Qt 5.3.0. Everything working fine.
> 
> On this new app I have used 5.4.1 for deployment. The in app purchases 
> worked fine during development. On Google Play it is also working 
> perfectly on a production environment.
> 
> On iOS however, I have seen my app approved 4 hours ago and I can’t still 
> see the prices of my in app purchases.
> 
> Some say that it my take up to 36 hours to have in app purchases 
> propagated thru the servers.
> 
> Does anyone know of problems with Qt 5.4.1 in iOS in app purchase in a 
> production environment?
> 
> Thanks,
> 
> With my best regards,
> 
> Nuno Santos
> ___
> 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
> 
> ___
> 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] sha256 checksums for Qt downloads

2015-02-19 Thread Samuel Gaist

On 19 févr. 2015, at 16:05, Bo Thorsen  wrote:

> On 02/19/2015 02:36 PM, Jérôme Pinguet wrote:
>> Hello!
>> 
>> Would it be possible to add sha256 (and/or sha512) checksums to the Qt
>> 4.8.6 download page [1]?
>> 
>> md5 checksums are easily forged in a few days with a couple of GPUs. In
>> a post-Snowden era, to avoid security issues with downloads on a page
>> that is not https by default, using sha2 (sha256 for instance) is necessary.
>> 
>> Other security enhancements suggested:
>> 
>> * make https default for download pages
>> * sign checksums files (md5sums-4.8.6 and the future sha256sums-4.8.6)
>> file with a well known Qt developper's GPG key
>> 
>> Thank you for helping all of us improve security and fight malware
>> through the use of up-to-date and secure hashing algorithms! :-)
>> 
>> [1] http://download.qt.io/archive/qt/4.8/4.8.6/
> 
> There's a very clear rule in 4.8: No new features are allowed. It's 
> pretty much only security fixes that will find it's way to this. Perhaps 
> some bug fixes as well.
> 
> So no, you won't get this for a 4.8 based application.
> 
> Your options are to upgrade Qt to 5.x (which you probably chose not to 
> for some reason) or to implement it yourself.
> 
> If you need this for a 4.8 based application, you can just create your 
> own Qt patch and build Qt yourself with it. It shouldn't be difficult to 
> port the code from the 5.x sources to 4.8.
> 
> Bo Thorsen,
> Director, Viking Software.
> 
> -- 
> Viking Software
> Qt and C++ developers for hire
> http://www.vikingsoft.eu
> ___

Hi,

@Bo
I think the OP was just asking to add the information on the download page and 
secure it using https

@Jérome
It's available in the "Details" for each download

Cheers
Samuel

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


Re: [Interest] GStreamer missing plugin error

2015-01-28 Thread Samuel Gaist

On 28 janv. 2015, at 13:48, René J.V. Bertin  wrote:

> On Wednesday January 28 2015 10:02:26 Thiago Macieira wrote:
> 
>>> Does that mean that Qt evolves in x.1 steps nowadays??
>> 
>> We've always released minor versions. You may remember 4.7 happened before 
>> 4.8.
>> 
>> If you meant something else, it isn't clear.
> 
> Oh come on ... Sure, I could have written 0.1 instead of x.1, but I think 
> it's still clear enough that a 0.1 (x.1) step causes smaller steps (0.0.1, 
> 0.0.2, ...) to be skipped…
> 

Hi,

No it doesn't however new features like the migration from gstreamer 0.1 to 
1.0, new APIs like those used by the Qt3D next gen module etc. don't happen in 
bug fix releases but between two minor releases.

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


Re: [Interest] [qt-iOS] API for Apps to Forbid Custom Keyboards

2014-12-04 Thread Samuel Gaist

On 4 déc. 2014, at 08:30, Till Oliver Knoll  wrote:

> 
>> Am 04.12.2014 um 07:40 schrieb Robert Iakobashvili :
> ...
>> 
>> To disable custom keyboard in your app completely override the
>> application:shouldAllowExtensionPointIdentifier:
>> 
>> (BOOL)application:(UIApplication *)application
>> shouldAllowExtensionPointIdentifier:(NSString
>> *)extensionPointIdentifier {
>> // Disallow custom keyboards return ![extensionPointIdentifier
>> isEqualToString:UIApplicationKeyboardExtensionPointIdentifier];
>> }
>> 
> 
> This is a platform-specific functionality and as such not a candidate for 
> being supported by a cross-platform API.
> 
> Maybe it will make it into an "OS specific module" of Qt?
> 
> (Such platform-specific modules do exist, e.g. for Windows, X11 and OS X - 
> maybe iOS/Android, too?)

QtMacExtras is for both iOS and OS X
QtAndroidExtras is pretty self-explanatory ;)

> 
> The good news is that for the time being you can call this platform-specific 
> API yourself! It is very easy to combine Obj-C++ with C++ -> Google is your 
> friend ;)
> 
> 
> 
>> The question is how/where it could be done
>> in a Qt application.
> 
> Just after you have created the Q(Gui)ApplicationObject in main() I guess (or 
> whatever suitable "init" place exist for QtQuick-based applications).
> 
> Cheers,
>  Oliver
> ___
> 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] QSettings mystery

2014-12-03 Thread Samuel Gaist

On 3 déc. 2014, at 21:39, Till Oliver Knoll  wrote:

> 
>> Am 03.12.2014 um 17:15 schrieb Nuno Santos :
>> 
>> Hum… interesting. I will try it.
>> 
>> One more question. While i’m targeting this app to iOS and Android, the main 
>> development is made on the computer to accelerate development.
>> 
>> One curious fact is that the file is pointing to the bundle identifier 
>> com.imaginando.lk.LK.plist but I don’t have that defined anywhere for the 
>> computer version. At least I would have something similar to the iOS 
>> version. How can Qt be assuming this?
> 
> http://hints.macworld.com/article.php?story=20121101064200135
> 
> ;)
> 
> Cheers,
>  Oliver

Good technique :)

It the case of Qt, it's based on the information your give through 
QCoreApplication::setApplicationName and QCoreApplication::setApplicationDomain

Samuel

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


Re: [Interest] QSettings mystery

2014-12-03 Thread Samuel Gaist
Hi,

If the system didn't change since last version, the preferences are cached by 
cfprefsd, so you have to call "defaults delete [your bundle identifier]" on the 
command line.

If that doesn't work, you'll have to kill cfprefsd. Beware to only kill the one 
for your user.

Hope it helps

Samuel

On 3 déc. 2014, at 17:00, Nuno Santos  wrote:

> Hi,
> 
> I’m being faced with a mystery.
> 
> I’m using QSettings to save my application settings and I have used the 
> filename method to find the path to the file where the settings are being 
> saved.
> 
> After deleting the file and starting the app again, there are settings 
> persisting. I have already tried to find other possible locations for the 
> file without success. 
> 
> Does anyone has a clue of what might be happening here? I’m on Mac OS X 
> 10.10.1
> 
> Thanks,
> 
> Nuno
> 
> 
> ___
> 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] QStandardPaths on iOS

2014-11-20 Thread Samuel Gaist
Hi,

It's supported. 

The documentation is currently getting fixed

On 20 nov. 2014, at 11:16, Harri Pasanen  wrote:

> http://qt-project.org/doc/qt-5/qstandardpaths.html
> 
> Does not seem to have anything for iOS.
> 
> Is it not yet supported for iOS, or is the documentation lagging behind?
> 
> 
> 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] Ubuntu 13.10 Qt5.4 alpha build error

2014-09-30 Thread Samuel Gaist
Hi

On 30 sept. 2014, at 10:52, Ramakanthreddy Kesireddy 
 wrote:

> Hi,
>  
> Am getting below build error while trying to compile Qt5.4 alpha on Ubuntu 
> 13.10 desktop.
>  
> using python: /usr/bin/python version: 2.7.5+ (default, Feb 27 2014, 
> 19:39:55) 
> [GCC 4.8.1]
> Using extra options found in 
> /home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtwebengine/src/core/qmake_extras.gypi
> Using extra options found in 
> /home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtwebengine/src/core/qtwebengine_extras.gypi
> Updating projects from gyp files...
> Package xcursor was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xcursor.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xcursor' found
^^
You are missing the libxcursor-dev package

> gyp: Call to 'pkg-config --cflags xcursor' returned exit status 1.
> Project ERROR: -- running gyp_qtwebengine failed --
> make[3]: *** [sub-gyp_run-pro-install_subtargets] Error 3
> make[3]: Leaving directory 
> `/home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtwebengine/src/core'
> make[2]: *** [sub-core-install_subtargets] Error 2
> make[2]: Leaving directory 
> `/home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtwebengine/src'
> make[1]: *** [sub-src-install_subtargets] Error 2
> make[1]: Leaving directory 
> `/home/sona/qt-everywhere-opensource-src-5.4.0-alpha/qtwebengine'
> make: *** [module-qtwebengine-install_subtargets] Error 2
> 
> Please let me know if am missing anything in this regard.
>  
> Thanks and Regards,
> Ramakanth
>  


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


Re: [Interest] How to read Qmake .pro file built-in variables

2014-09-25 Thread Samuel Gaist

On 25 sept. 2014, at 15:04, rap  wrote:

> Is there a way to read the contents of the qmake project file (.pro) built-in 
> variables, specially the "TARGET" variable?  I'm doing 
> a bunch of small examples and getting the TARGET (.exe) name to my QWindow 
> class would help to pass the name to setTitle() 
> consistently and automatically.
> 
> Thanks,
> /Risto 
> 

Hi,

What about QCoreApplication::applicationName() ?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Nomination for Qt Champion

2014-09-17 Thread Samuel Gaist
On 17 sept. 2014, at 21:57, Emmanuel Mayssat  wrote:

> http://qt-project.org/wiki/QtChampions
> I found the page above.
> 
> Is there a way to still nominate a Qt Champion for 2014?
> 

Yes, if you have an account, just edit the page. If not, you can ask someone 
who has to do it for you

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


Re: [Interest] Anywhere to report documentation typos?

2014-08-27 Thread Samuel Gaist
Hi,

The bug report system is the correct place (http://bugreports.qt-project.org)

However, there's a patch pending fixing this typo

Have a nice day

Samuel

On 27 août 2014, at 16:22, Ben  wrote:

> Dear all,
> 
> There's a typo on page http://qt-project.org/doc/qt-5/properties.html. The 
> closing parenthesis is lost in the following line:
> 
>(i.e., if it wasn't declared with Q_PROPERTY()
> 
> And where should I report documentation typos like this?
> 
> Thank you,
> 
> Ben
> ___
> 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] How to stop dissassembler view?

2014-08-08 Thread Samuel Gaist

On 8 août 2014, at 14:14, rap  wrote:

> Debugging always brings the dissassembler view at Breakpoints. How can this 
> be stopped?
> I just need to break on Breakpoints in my source code. 
> 
> Thanks
> - Risto 
> 

Hi, 

Are you by any chance trying to debug a release build ?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Unified items in QListView icon mode

2013-11-19 Thread Samuel Gaist
Ok, I se the problem. However the behavior is consistent: I mean by that that 
everything is top aligned. But If I understood you correctly the behavior 
should be that without a valid Icon the text should be at the same height as 
the one with valid icons. Am I right ?

On 19 nov. 2013, at 11:23, Philipp Kursawe  wrote:

> sure:
> 
> http://pastebin.com/5ncqUJrs
> 
> 
> On Mon, Nov 18, 2013 at 9:39 PM, Samuel Gaist  
> wrote:
> Do you have a minimum sample that reproduce the problem ?
> 
> On 18 nov. 2013, at 21:31, Philipp Kursawe  wrote:
> 
> > Its a mixed problem I guess. When the items has to long label, the total 
> > size of the item is increased (horizontally) to fit the label text. 
> > However, if there is no icon attached to the item (becuase the models 
> > decoration returns none) then the items text appears top aligned and not 
> > where the other items text appears (at the bottom of the icon).
> >
> >
> > On Mon, Nov 18, 2013 at 9:29 PM, Samuel Gaist  
> > wrote:
> >
> > On 18 nov. 2013, at 18:02, Philipp Kursawe  wrote:
> >
> > > I wonder whats broken with the QListView.
> > > I want it to display 64x64 icons and a label (which can be quite long).
> > > What properties do I have to set so the listview renders the items (even 
> > > the ones without a Qt::Decoration role) correctly in a 64x64 grid?
> > >
> > > ___
> > > Interest mailing list
> > > Interest@qt-project.org
> > > http://lists.qt-project.org/mailman/listinfo/interest
> >
> > Hi,
> >
> > Do you have a problem with word wrapping ?
> >
> > ___
> > 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

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


Re: [Interest] Unified items in QListView icon mode

2013-11-18 Thread Samuel Gaist
Do you have a minimum sample that reproduce the problem ?

On 18 nov. 2013, at 21:31, Philipp Kursawe  wrote:

> Its a mixed problem I guess. When the items has to long label, the total size 
> of the item is increased (horizontally) to fit the label text. However, if 
> there is no icon attached to the item (becuase the models decoration returns 
> none) then the items text appears top aligned and not where the other items 
> text appears (at the bottom of the icon).
> 
> 
> On Mon, Nov 18, 2013 at 9:29 PM, Samuel Gaist  
> wrote:
> 
> On 18 nov. 2013, at 18:02, Philipp Kursawe  wrote:
> 
> > I wonder whats broken with the QListView.
> > I want it to display 64x64 icons and a label (which can be quite long).
> > What properties do I have to set so the listview renders the items (even 
> > the ones without a Qt::Decoration role) correctly in a 64x64 grid?
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 
> Hi,
> 
> Do you have a problem with word wrapping ?
> 
> ___
> 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] Unified items in QListView icon mode

2013-11-18 Thread Samuel Gaist

On 18 nov. 2013, at 18:02, Philipp Kursawe  wrote:

> I wonder whats broken with the QListView.
> I want it to display 64x64 icons and a label (which can be quite long).
> What properties do I have to set so the listview renders the items (even the 
> ones without a Qt::Decoration role) correctly in a 64x64 grid?
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

Do you have a problem with word wrapping ? 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QStringList, takeFirst and order of execution

2013-11-11 Thread Samuel Gaist

On 11 nov. 2013, at 13:50, Giuseppe D'Angelo  wrote:

> Il 11/11/2013 13:37, Samuel Gaist ha scritto:
>> Hi,
>> 
>> I have been experiencing a strange behavior with QStringList and the order 
>> of execution of takeFirst.
>> 
>> The following code:
>> 
>> QString line = file.readLine();  // line contains "46 71\n"
>> QStringList lineData = line.split(); // lineData contains ("46", "71\n")
>> qDebug() << lineData.takeFirst() << lineData.takeFirst();
> 
> I've already explained this in the past but I can't find the relevant email. 
> This last line is parsed as
> 
>> operator<<( operator<<( qDebug(), lineData.takeFirst() ) , 
>> lineData.takeFirst() )
> 
> (operator<< is left associative).
> 
> Take the outer operator<<. C++ does not define the order of evaluating its 
> parameters. That means that either lineData.takeFirst() can be called before 
> evaluating the inner operator<<, or vice-versa. Depending on what the 
> compiler chooses to do, you'll have a different result.
> 

Ok, with that and the explanation of Thiago, it's crystal clear. Thanks !

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


Re: [Interest] QStringList, takeFirst and order of execution

2013-11-11 Thread Samuel Gaist

On 11 nov. 2013, at 13:42, Thiago Macieira  wrote:

> On segunda-feira, 11 de novembro de 2013 13:37:20, Samuel Gaist wrote:
>> Hi,
>> 
>> I have been experiencing a strange behavior with QStringList and the order
>> of execution of takeFirst.
> 
>> qDebug() << lineData.takeFirst() << lineData.takeFirst();
> 
> The problem is not takeFirst.
> 
>> behaves differently on two computers.
> 
> Correct. You have undefined behaviour.
> 
> Both calls to takeFirst() are in the same "sequence-point". That means the 
> compiler is allowed to execute in any order.
> 
> It would be the same if you had written:
> 
>   f(lineData.takeFirst(), lineData.takeFirst());
> 
>> qDebug() << lineData.takeFirst();
>> qDebug() << lineData.takeFirst();
>> 
>> The order is correct on both of them.
>> 
>> What could explain the difference ?
> 
> In the second case, there are two sequence points (they are separated by a 
> ;). 
> 
> In C++11-speak, the first line of the second example is guaranteed to 
> "happens-
> before" the second line. In the first example, there's no "happens-before", 
> therefore any one can happen before the other, or after.

I see, thanks for the explanation !

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


[Interest] QStringList, takeFirst and order of execution

2013-11-11 Thread Samuel Gaist
Hi,

I have been experiencing a strange behavior with QStringList and the order of 
execution of takeFirst.

The following code:

QString line = file.readLine();  // line contains "46 71\n"
QStringList lineData = line.split(); // lineData contains ("46", "71\n")
qDebug() << lineData.takeFirst() << lineData.takeFirst();

behaves differently on two computers.

The first one is a MacOS X 10.8.5 with Xcode 4.6.3 installed and using the 
5.2.0 alpha package with gcc
The second one is a MacOS X 10.8.5 with Xcode 5.0.1 installed and a developer 
build (no special configuration) of the latest stable branches from git with 
clang

The first computer outputs "71\n" "46" and the second one "46" "71\n"

The same happens if I build e.g. a QSize using:

QSize mySize = QSize(lineData.takeFirst().toInt(), 
lineData.takeFirst().toInt());

on the other hand, if I call 

qDebug() << lineData.takeFirst();
qDebug() << lineData.takeFirst();

The order is correct on both of them. 

What could explain the difference ?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] OSX newbie question on Qt5 src build

2013-10-16 Thread Samuel Gaist

On 16 oct. 2013, at 11:37, Till Oliver Knoll  
wrote:

> Am 16.10.2013 um 09:35 schrieb Mandeep Sandhu :
> 
>> Hi All,
>> 
>> I have a old iMac running OSX 10.5.8 (Xcode 3.1).
>> 
>> Is it possible to build Qt5 on it or is it tool old a version?
> 
> Given that not even Snow Leopard 10.6 is supported *for development* anymore 
> (but IIRC you can still *deploy* your Qt applications on 10.6) I don't think 
> you can compile Qt 5.x "out of the box" on OS X < 10.7.
> 
> Unless you are prepared to fiddle around with the sources (mostly the 
> Objective C sources which interface with the Cocoa etc. API, I assume) and/or 
> manually upgrade your compiler.
> 
> Cheers,
>  Oliver

You still can with 10.6.5 and the latest Xcode 3 (I don't have the exact 
numbers handy)

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


Re: [Interest] QUdpSocket broken?

2013-09-21 Thread Samuel Gaist

On 12 sept. 2013, at 04:01, Thiago Macieira wrote:

> All that worked in Qt 4 continues to work in Qt 5. GPS wasn't part of Qt 4 
> (that was Mobility and most of it only supported the Nokia platforms); 3D 
> wasn't part of Qt 4 either (Mobility again). Qt Quick 1 continues to work 
> exactly like it used to. As for widgets, there are a few known corner-case 
> regressions (session management, for example), the code is mostly unchanged.
> 

Please, excuse the intrusion, I just wanted to say that this particular 
corner-case is being currently solved

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


Re: [Interest] Qt Multimedia - Record from Applications Output

2013-07-01 Thread Samuel Gaist
Hi, 

You might be interested by the Qt Media Encoding Library project.

I don't have the link handy, sorry, but it should be the first result of a 
Google search.

Hope it helps

On 1 juil. 2013, at 10:17, Lopes Yoann  wrote:

> Hi,
> 
> This is not something you can do with Qt Multimedia at the moment. Feel free 
> to create a suggestion at https://bugreports.qt-project.org if you would like 
> to see this feature added to Qt in the future.
> 
> Best regards,
> 
> Yoann Lopes
> Senior Software Engineer - Digia, Qt
> Visit us on: http://qt.digia.com
> 
> On Jun 28, 2013, at 9:26 PM, Lucas Betschart wrote:
> 
>> Hi list
>> 
>> Is it possible to record the output of an application (e.g. sound of a game) 
>> with Qt Multimedia?
>> Looking the first time through its documentation I couldn't find anything 
>> like that (only recorded from output / input hardware by getting a 
>> QAudioDeviceInfo).
>> Would be cool if I can do that system independent and don't have to use 
>> PulseAudio libs and similiar.
>> 
>> Regards
>> Lucas
>> ___
>> 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
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Gerrit integration failure on unrelated test

2013-06-13 Thread Samuel Gaist
Hi,

I would like to know what is the proper course of action when an integration 
fails because of something unrelated.

I've tried to merge two patches for OS X ui related bug in qtbase and the CI 
tells me that tst_QsslSocket fails for win32 mingw47 on windows 7.
It all seems related to time out issues.

What should I do from that point ?


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


Re: [Interest] Corner Widget not visible

2013-05-16 Thread Samuel Gaist
Based on your last email regarding the possibility of using vertical headers 
with QTabWidget... Are you trying to add your QPushButton to a QTabWidget using 
East or West tab positions ?
If that's the case, the documentation states that corner widgets are only 
working properly with North and South tab positions.

On 16 mai 2013, at 16:09, Sujan Dasmahapatra wrote:

> I have set a QTabWidget on QMainWindow .ui. And then in main function setting 
> a corner widget a QPushButton as below
> QPushButton *button = new QPushButton("AddPage",this);
> button->setGeometry(0,0,120,20);
> ui->setupUi(this);  
> ui->tabWidget->setCornerWidget(button,Qt::TopRightCorner);
> button->show();
> 
> But My PushButton is not visible. Whats going wrong in this. Any help is 
> appreciated. Thanks
> 
> -- 
> Thanks & Regards
> Sujan
> ___
> 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] QVariant cannot take custom type

2013-04-05 Thread Samuel Gaist
He explains how to handle QObject * so a pointer to QObject instance, not a 
QObject instance.

On 5 avr. 2013, at 12:22, Aekold Helbrass wrote:

> So, it is absolutely impossible to use QObject-derived class with QVariant? 
> I'm storing QList of pointers already, and I want to write that with 
> QMetaProperty. The only thing that needs copy-constructor, in my 
> understanding, is qRegisterMetaType invocation.
> 
> I even read an article where guy explains how to get other types than one 
> you're storing, so it looks like there is no problem in storing QObject in 
> QVariant, but for some reason it doesn't work for me:
> http://steveire.wordpress.com/2011/03/16/implementing-qvariantqmetatype-features-with-template-tricks/
> 
> 
> On Fri, Apr 5, 2013 at 12:44 PM, André Somers  wrote:
> Op 5-4-2013 11:39, Sven Bergner schreef:
> > Hello,
> > you can use a custom type with QVariant by declaring it
> > using Q_DECLARE_METATYPE ( Type ).
> > Hope that helps.
> >
> It does not. That was already in the code posted in the opening post. As
> noted by others, the issue lies with trying to use a QObject derived
> class here.
> 
> André
> 
> --
> You like Qt?
> I am looking for collegues to join me at i-Optics!
> 
> ___
> 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

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


Re: [Interest] QVariant cannot take custom type

2013-04-05 Thread Samuel Gaist
Hi,

IIRC, you can't have Item or Holder in a QVariant because there QObject so the 
copy constructor is disabled for them.

This thread might be of interest 
http://stackoverflow.com/questions/7872578/how-to-properly-use-qregistermetatype-on-a-class-derived-from-qobject

Hope it helps

On 5 avr. 2013, at 09:37, Aekold Helbrass wrote:

> Hi All!
> 
> Short story is: I'm trying to put custom type into QVariant and it doesn't 
> work, on debug I see QVariant with value  and trying to read 
> it I'm getting segfault.
> 
> Long story, I'm new to Qt/C++ so I'm trying to do everything very carefully, 
> but I'm almost sure it's some rookie mistake in my code. This code started as 
> attempt to bind JSON tree to object tree, and stopped on reading of QList, 
> because QMetaProperty wants QVariant.
> 
> Source code:
>  main.cpp 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> 
> #include "item.h"
> #include "holder.h"
> 
> Q_DECLARE_METATYPE(Item)
> Q_DECLARE_METATYPE(Item*)
> Q_DECLARE_METATYPE(Holder)
> 
> int main(int argc, char *argv[]) {
> QCoreApplication a(argc, argv);
> 
> int typeItem = qRegisterMetaType("Item");
> int typeHolder = qRegisterMetaType("Holder");
> int typeItemList = qRegisterMetaType >("QList>");
> int typeItemPointer = qRegisterMetaType("Item*");
> 
> QList list;
> for (int i = 0; i < 10; i++) {
> void* created = QMetaType::create(typeItem);
> Item* item = static_cast(created);
> item->setName("item " + i);
> // attempt 1:
> QVariant var(typeItem, created);
> // attempt 2:
> //QVariant var;
> //var.setValue(item);
> // attempt 3:
> //QVariant var = QVariant::fromValue(item);
> list.append(var);
> }
> 
> Holder* holder = new Holder();
> int index = holder->metaObject()->indexOfProperty("items");
> QMetaProperty property = holder->metaObject()->property(index);
> property.write(holder, list);
> 
> QList items = holder->items();
> for (int i = 0; i < items.size(); i++) {
> Item* item = items.at(i);
> qDebug() << "name: " << item->name();
> }
> 
> return a.exec();
> }
> 
> === holder.h 
> ===
> #ifndef HOLDER_H
> #define HOLDER_H
> 
> 
> #include 
> 
> #include 
> #include "item.h"
> 
> class Holder : public QObject {
> 
> Q_OBJECT
> Q_PROPERTY(QList items READ items WRITE setItems)
> 
> public:
> Holder(QObject* parent=0) : QObject(parent) {}
> 
> Holder(const Holder& copy, QObject* parent=0) : QObject(parent) {
> 
> pItems = copy.items();
> 
> }
> Holder& operator =(const Holder& value) {
> 
> pItems = value.items();
> 
> }
> QList items() const {
> 
> return pItems;
> 
> }
> public slots:
> 
> void setItems(const QList& value) {
> 
> pItems = value;
> 
> }
> private:
> 
> QList pItems;
> 
> };
> 
> #endif // HOLDER_H
> 
> 
> 
> == item.h 
> #ifndef ITEM_H
> 
> #define ITEM_H
> 
> #include 
> 
> class Item : public QObject {
> 
> Q_OBJECT
> Q_PROPERTY(QString name READ name WRITE setName)
> 
> public:
> Item(QObject* parent=0) : QObject(parent) {}
> 
> Item(const Item& copy, QObject* parent=0) : QObject(parent) {
> 
> pName = copy.name();
> 
> }
> Item& operator =(const Item& value) {
> 
> pName = value.name();
> 
> }
> QString name() const {
> 
> return pName;
> 
> }
> 
> public slots:
> 
> void setName(const QString& value) {
> 
> pName = value;
> 
> }
> private:
> 
> QString pName;
> 
> };
> 
> #endif // ITEM_H
> 
> 
> 
>  end ===
> ___
> 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] Compiling Qt 4 on OS X 10.8 for 10.6 deployment

2013-03-20 Thread Samuel Gaist
Hi,

Have a look at http://qt-project.org/forums/viewthread/25806/

Hope it helps

On 20 mars 2013, at 14:01, Michael Jackson wrote:

> What is the magic configure argument to be able to build Qt 4.8.4 on OS X 
> 10.8 but be able to deploy my application back to OS X 10.6.8?
> 
> Thanks
> ---
> Mike Jackson   
> ___
> 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] Image Format plugins not loading on windows

2013-03-07 Thread Samuel Gaist
Hi,

Did you copy the plugins dll or do you have a "plugins/imageformats" folder 
your executable directory ?

On 7 mars 2013, at 16:48, Michael Jackson wrote:

> I have some code in Qt where I am loading a tiff image file. I have placed 
> all the folder "plugins/imageformats/*" from my Qt Build into the same 
> directory as my executable file. When I try to load the QImage 
> image(path_to_tiff) I get a null QImage object back. Checked by using 
> image.isNull() method.
> 
>   The path to the file does exist. This same setup works fine on another 
> development machine but not this one. I even tried putting a qt.conf file in 
> with my executable and that did not seem to help. 
>  Is there some Qt function to query any possible errors that might have 
> occurred when my program tried to load the Qt image plugins? 
> 
> This on machines with Windows 7 x64 with Visual Studio 2010 SP1 and a self 
> built Qt 4.8.4.
> 
> Thank you for any help.
> ---
> 
> Mike Jackson
> ___
> 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] Best way to QObject-wrap simple objects

2013-02-19 Thread Samuel Gaist
Hello,

IIRC you don't,

You have to Q_DECLARE_METATYPE your POD, qRegisterMetaType it and maybe 
(depends on your use case) add the in/out stream operators (only if you need to 
load and store in a QVariant).

Hope it helps

On 19 févr. 2013, at 14:19, K. Frank wrote:

> Hello List!
> 
> Sometimes I have a simple class, maybe a POD, that I want to
> pump through a queued signal-slot connection.  As I understand
> it, I need a QObject to do that.  So I wrap my class in QObject.
> 
> What are some good idioms for this?  What is the most parsimonious
> approach?
> 
> Here's one method I've used:
> 
> 
> wrapped_pod.h:
> 
>   #include "pod.h"
>   #include 
>   #include 
> 
>   class WrappedPOD : public QObject, public POD {
>  Q_OBJECT
>  public:
> WrappedPOD() {}
> WrappedPOD (const WrappedPOD &wp) : POD(wp) {}
> WrappedPOD (const POD &p) : POD(p) {}
>~WrappedPOD() {}
> };
> 
> 
> (A comment:  I was a little surprised that I seem to need to define
> the constructors.  I would have thought that the c++ defaults would
> have sufficed.)
> 
> Any thoughts on other, better ways to achieve this goal?  Or is there
> an approach I can use that avoids wrapping the object in the first place?
> 
> I imagine that this is not an uncommon need, so I imagine that there
> is some standard practice I can learn from.
> 
> 
> Thanks.
> 
> 
> K. Frank
> ___
> 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] Unable to call QKeyEvent::key()

2013-01-29 Thread Samuel Gaist
Hi,

did you #include  in your cpp file ?

Hope it helps
Samuel

On 29 janv. 2013, at 09:22,   wrote:

> Hi,
> Much as it gets boring seeing posts which start with *noob alert* warnings I 
> am kind of in the same position right now. However, I have used Qt 
> extensively via PySide though am just starting off with c++/Qt.
> I am trying to reimplement the keyPressEvent on a class which inherits 
> QMainWindow but if I call event->key() it throws an error saying "invalid use 
> of incomplete type 'class QKeyEvent' from 
> /opt/lib/Qt5.0.0/5.0.0/gcc/include/QtWidgets/qmainwindow.h:45:0".
> The constructor is:
> void Window::keyPressEvent(QKeyEvent *event). I installed Qt using the latest 
> Qt5 installer on Ubuntu 12.10.
> Thanks in advance.
> - Ab.
> 
> --
> Sent from my mobile device
> ___
> 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] QDataWidgetMapper issues

2013-01-08 Thread Samuel Gaist
Hi,

For problem number one, isn't editingFinished what you want ? (It comes from 
the QAbstractSpinBox)

Hope this helps
Samuel

On 8 janv. 2013, at 10:19, Danny Price wrote:

> I'm having trouble using the venerable QDataWidgetMapper class in my project.
> 
> I have a set of QDoubleSpinboxes mapped to indexes in my table model. I've 
> set the submit policy of the mapper to manual and connected the change 
> signals of the widgets to the submit slot so the data in the boxes is 
> committed when the user scrolls the mouse wheel or the keyboard (this is far 
> better than having to tab out of boxes for the data to be set).
> 
> There are two issues:
> 1) QDoubleSpinbox emits the valueChanged signal when the data is changed both 
> by the user and by the mapper which leads to an endless self-notification 
> loop. QDoubleSpinbox doesn't have a 'valueEdited' signal which is only 
> emitted when the user makes a change which is big limitation. To get around 
> this I've subclassed it and connected a custom 'userChanged' signal to the 
> embedded QLineEdit's textEdited signal which has forced me to change all my 
> client code.
> 
> Is there away to set the data mapper to disable signals (or ignore them) for 
> widgets under it's control when data is being set on them? By using 
> blockSignals? That would avoid the need to subclass.
> 
> 2) The data is quite complex and the model needs to edit some fields when 
> others change (e.g. they are proportionally related). It does this in the 
> dataChanged override and uses emit dataChanged signal when the other fields 
> change. This works fine the table view. The problem is that the data mapper 
> commits the data for ALL fields when the submit slot is called so the edits 
> by the model get wiped out. It's also inefficient.
> 
> Is there away to set the data mapper to only submit the data for a specific 
> field when it is edited instead of all of them? I've looked at the 
> implementation and all the important parts are hidden so subclassing is not 
> an option. I really shouldn't have to write my own version.
> 
> These simple design limitations (spinbox lacking a user-edited signal and 
> data widget mapper committing eveything) are a real pain. By contrast I could 
> do the whole thing in Cocoa (on the OSX) with bindings with only a few lines 
> of code.
> ___
> 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] MacOS 10.4 + QT 4.7.4 + my app linking error

2012-11-28 Thread Samuel Gaist
>From the top of my head I would say Carbon

Hope it helps
Samuel

On 28 nov. 2012, at 11:09, Sergey wrote:

> After linking with zlib and CoreFoundation framework, these functions 
> are still not found:
> 
> _FrontWindow
> _GetCurrentProcess
> _SelectWindow
> _SetFrontProcess
> _ShowWindow
> 
> What must I link additionally?
> 
> 28.11.2012 9:28, Lincoln Ramsay wrote:
>> 
>> I seem to recall Mac apps needing to explicitly link to CoreFoundation
>> even if they weren't directly using it.
>> 
>> The CFxxx symbols are certainly that library...
>> 
>> It may be that linking to CoreFoundation means you don't need to link to
>> zlib too...
>> 
>> mac:LIBS += -framework CoreFoundation
>> 
> 
> ___
> 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] [OT] Is it possible to detect hard drive type (fixed/removable) on Windows using Qt?

2012-11-26 Thread Samuel Gaist
If you want to be cross-platform, you might be interested in KDE's Solid 
library (they are in the process of modularizing it). 

It's Qt based and does not need the whole KDE framework .

Hope it helps,
Samuel

On 26 nov. 2012, at 13:53, Francisco Ares wrote:

> Hello.
> 
> Sorry for this off-topic.
> 
> I did not find anything like this on the documentation. In Linux I would not 
> use Qt,  it would be the case to, say, monitor a few kernel messages and/or 
> logs or just the mounted file systems to detect this type of information.
> 
> But what about Windows? Any hints?
> 
> Thanks
> Francisco
> -- 
> "If you have an apple and I have an apple and we exchange apples then you and 
> I will still each have one apple. But if you have an idea and I have one idea 
> and we exchange these ideas, then each of us will have two ideas." - George 
> Bernard Shaw
> ___
> 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] Qmake and changes in the library

2012-08-31 Thread Samuel Gaist
Hi,

Have a look at:
http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#pre-targetdeps

Hope it helps
Samuel

On 31 août 2012, at 11:46, Igor Mironchik wrote:

> Hi,
> 
> Is it possible to say in QMake projects that when changes appears in the 
> library then all targets, depended on that library, must rebuilded? 
> Because at this time I see that when I change something in the library 
> then recompilation occur only on that library, and all targets that 
> links to this library don't rebuild. I believe that my question is clear...
> ___
> 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] QSettings: is a group present? Crash with qWarning.

2012-08-23 Thread Samuel Gaist
Hi,

Looks like your on mac, trying on mine I get this at compilation time:

warning: cannot pass objects of non-POD type 'class QBool' through '...'; call 
will abort at runtime

Here is the why of your crash

Hope it helps
Samuel

On 23 août 2012, at 16:51, Sensei wrote:

> Hi everyone.
> 
> Here's again a question, this time on QSettings with INI files. The 
> question is simple: how do I know if a group exists in my INI file?
> 
> Well, I could ask for all groups with childGroups(), and use the 
> contains("theGroupName") method.
> 
> Except that I don't know why this crashes when used inside a qWarning. 
> This is the very simple INI file:
> 
> 
> 
> [first]
> item=2
> 
> [last]
> size=1
> 
> 
> 
> 
> This is the super simple code I've written:
> 
> 
> 
> #include 
> #include 
> 
> int main(int argc, char *argv[])
> { 
>   QSettings s("/Users/sensei/Desktop/proj.txp", QSettings::IniFormat);
> 
>   bool x = s.childGroups().contains("first");
>   qWarning("Number of groups: %d", s.childGroups().size());
>   qWarning("Contains [first]: %d", x); // OK
>   qWarning("Contains [first]: %d", s.childGroups().contains("first")); // 
> BOOM!
> 
>   return 0;
> }
> 
> 
> and your .pro file:
> 
> TEMPLATE = app
> SOURCES += main.cpp
> 
> 
> 
> 
> I don't know why this happens. Any hints? I might be missing something 
> SO obvious...
> 
> 
> Cheers!
> 
> 
> 
> 
> PS. My environment is OSX 10.8, the qt installation is the one that I 
> installed on the previous OSX version. Qt is 4.8.0 (the SDK Maintenance 
> Tool says I have no updates available).
> ___
> 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] Organizing multiple Qt and non-Qt "projects" that share code

2012-07-29 Thread Samuel Gaist

On 30 juil. 2012, at 00:02, K. Frank wrote:

> Hello List!
> 
> What are some good ways to organize source code -- directory hierarchies,
> and such -- that will be used to build multiple Qt and non-Qt applications?
> 
> So far when I've written Qt applications, I've had one Qt "project" per
> application (where an application is a .exe file), and I've had all of my
> source code (including things like .ui files) live together in a single
> directory, and I build the application using qmake and a .pro file.
> 
> When code is shared between more than one project, I've simply
> copied the files (not counting well-organized third-party libraries).
> 
> My understanding is that I can't (or that at least it's not recommended to)
> use a single .pro file to build multiple targets (i.e., multiple 
> applications).
> 
> Now I want to build a suite of applications that will share significant code.
> Some will be Qt applications, some non-Qt (portable c++ command-line)
> applications, and maybe a few odd and ends like scripts.
> 
> If Qt / qmake weren't involved, I would probably put all of the source code
> into a single directory, and use make with a makefile that had build
> rules for multiple targets.
> 
> My preference would be not to use qmake for the non-Qt applications,
> so as not to introduce Qt as a dependency, but I could live with using
> qmake, if such an approach were otherwise significantly cleaner.  I
> would like the benefit of something like make or qmake that knows
> how to rebuild only the parts for the target in question and only the
> parts that have changed.  I am using mingw-w64 on windows 7.  I
> would strongly prefer not introducing additional build tools (e.g., cmake
> or ant) or scripting languages (e.g., tcl or perl), but, again, I would
> be open to doing so if the payoff were clearly worth it.
> 
> How would people suggest I organize the build process for something
> like this.
> 
> The scale should not be too large -- say five or six applications that
> share code, and  dozens, but probably not hundreds of source files.
> 
> Thanks for any ideas.
> 
> 
> K. Frank
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi Frank,

Personally, i am using the SUBDIR template for that case.
For example:

- mycoolproject
- apps
myfirstapp
src
test
doc
mynonqtapp
src
test
doc
- libs
mycoollib
src
test
doc
mynonqtlib
src
test
doc

Using that kind of approach allows you to have a flexible development setup (as 
well as using TDD to ensure the robustness of your code) . 

All the code you want to reuse goes in a library (Qt or not) and then you 
application(s) link to these libraries.
In the case where you don't want to "pollute" your installation target, simply 
build you libraries statically.

For the non Qt application/libraries simply add CONFIG -= qt and you're done, 
qmake for build system but no Qt involved.

Hope it helps

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


Re: [Interest] QMainWindow: add a dock widget as a floater?

2012-07-20 Thread Samuel Gaist

On 20 juil. 2012, at 11:52, Rui Maciel wrote:

> On 07/20/2012 10:31 AM, Samuel Gaist wrote:
>> Hi,
>> 
>> As silly as it might sound, why don't you just not add the
>> QDockWidget ? By default at construction time, the QDockWidget is a
>> floater. If you want it to be a QMainWindow children, just make the
>> QMainWindow it's parent.
> 
> I've tried that, but that ends up screwing up how the dock widget is 
> rendered. The dock widget is rendered properly when added through 
> addDockWidget(), though.
> 
> 
> Rui Maciel
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

My bad, i've forgotten the implication of widget parenting without a layout in 
between.

Did you also try my second suggestion ? addDockWidget + 
dockWidget.setFloating(true)

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


Re: [Interest] QMainWindow: add a dock widget as a floater?

2012-07-20 Thread Samuel Gaist
Hi,

As silly as it might sound, why don't you just not add the QDockWidget ?
By default at construction time, the QDockWidget is a floater. If you want it 
to be a QMainWindow children, just make the QMainWindow it's parent.

Another thing that might be done is using setFloating() from QDockWidget.

Hope it helps
Samuel

On 20 juil. 2012, at 11:12, Rui Maciel wrote:

> Is it possible to add a given QDockWidget object to a QMainWindow as a 
> floater?  According to the documentation for the QMainWindow class, the 
> QMainWindow::addDockWidget() member functions use Qt::DockWidgetAreas 
> flags to specify where to add a given dock widget, but there isn't a 
> flag for the floater case and when I pass the remaining options, 
> Qt::AllDockWidgetAreas or Qt::NoDockWidgetArea, the dock window appears 
> all screwed up.
> 
> So, is it possible to add a dock widget to a QMainWindow object as a 
> floater?  If it is, what does it take to get it done?
> 
> 
> Thanks in advance,
> Rui Maciel
> ___
> 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] [interest]

2012-06-19 Thread Samuel Gaist
Hi,

Take a look at:
http://qt-project.org/doc/qt-4.8/printing.html

And the classes mentioned in the documentation

Hope it helps
Samuel

On 19 juin 2012, at 19:34, Carlos Yoesly Oviedo Becerra wrote:

> how i can to export pdf in QT,please help me
> 
> 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS 
> INFORMATICAS...
> CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
> 
> http://www.uci.cu
> http://www.facebook.com/universidad.uci
> http://www.flickr.com/photos/universidad_uci
> ___
> 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] Porting Qt app to windows

2012-06-03 Thread Samuel Gaist
Another idea, from which path did you copy the QtCore4.dll ? The one in the 
folder from QtCreator ? Or the one from the provided Qt library tree ?

On 2 juin 2012, at 23:25, Chasc wrote:

> On Sat, 2012-06-02 at 14:37 +0200, Samuel Gaist wrote:
>> Hi,
>> Is your application only an exe ? Or do you build a library for it ?
> 
> I haven't built any libraries for it.
> 

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


Re: [Interest] Porting Qt app to windows

2012-06-02 Thread Samuel Gaist
Hi,
Is your application only an exe ? Or do you build a library for it ?
In case you have a library and build it dynamically (dll) have a look at this 
documentation page:

http://qt-project.org/doc/qt-4.8/sharedlibrary.html

Hope it helps
Samuel

On 2 juin 2012, at 12:02, Chasc wrote:

> On Fri, 2012-06-01 at 17:23 +0530, Muthulingam Ammaiappan wrote:
>> Hi Paul,
>> 
>> 
>> http://doc.qt.nokia.com/4.7-snapshot/deployment-windows.html 
>> 
>> 
>> the above link will answer your question about deploying the Qt
>> Applications on windows
>> 
>> 
> Thanks for directing me to the above link. I managed to download
> Dependency Walker and used it to include all the missing dll's. Now DW
> is telling me:
> 
> "Error: At least one module has an unresolved import due to a missing
> export function in an implicitly dependent module.
> Warning: At least one module has an unresolved import due to a missing
> export function in a delay-load dependent module."
> 
> But I can't see anything else in the app identifying any other dll as
> missing or defective. So where do I go from here given that the app does
> run in Qt Creator?
> 
> Regards,
> 
> Paul Cornford
>> 
>> 
>> 
> 
> 
> ___
> 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] Layout problem

2012-05-08 Thread Samuel Gaist
Hi,

I think you should take a look at the stretch factor (mentioned in the 
QBoxLayout doc) as well as the sizePolicy, and the various size properties for 
your widget (minimumSize, sizeHint, etc...)

Hope this helps
Samuel

On 8 mai 2012, at 11:25, Christian Gagneraud wrote:

> Hi list,
> 
> I'm trying to create a simple composite widget as following:
> - Container is a QGroupBox
> - Top widget is a compass (square shaped design based on the analog 
> clock example)
> - Below the compass are 2 pairs of labels/value
> 
> I would like the compass to occupy as much space as possible and the 2 
> labels/values to just "stick" below the compass.
> I have tried different solutions using the QVBoxLayout and the 
> QGridLayout, with not much success. In all cases, I had the labels 
> "pushing" the compass toward the top and causing its size to be too small.
> Is it a way to tell the layout to always keep the compass' size as big 
> as possible? Basically I would like that the compass width follows the 
> QGroupBox's width, and pushing or pulling the 2 pairs of labels/values 
> up and down (due to the compass square constraint)
> 
> Regards,
> Chris
> 
> 
> 
> 
> -- 
> Christian Gagneraud,
> Embedded systems engineer.
> Techworks Marine
> 1 Harbour road
> Dun Laoghaire
> Co. Dublin
> Ireland
> Tel: + 353 (0) 1 236 5990
> Web: http://www.techworks.ie/
> ___
> 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] QTextEdit not resizing with QFormLayout

2012-05-08 Thread Samuel Gaist
And also the doc about QMainWindow:

http://qt-project.org/doc/qt-4.8/qmainwindow.html#details

On 8 mai 2012, at 10:22, Diego Iastrubni wrote:

> Use layouts, not absolute positioning. Read the docs about it.
> 
> 
> On Tue, May 8, 2012 at 11:13 AM, Sujan Dasmahapatra  
> wrote:
> Please check this code snippet, with this when I resize the mainwindow, my 
> textedit is not resizing. What could be the problem pls help.
> 
>  
> 
> //mainwindow.h
> 
> QPushButton *button;
> 
> QTextEdit *edit;
> 
> QFormLayout *formL;
> 
>  
> 
> //mainwindow.cpp
> 
> MainWindow::MainWindow(QWidget *parent):QMainWindow(parent)
> 
> {
> 
> setGeometry(0,0,800,600);
> 
>  
> 
> button = new QPushButton("Click me!!",this);
> 
> button->setGeometry(5,5,100,25);
> 
> button->show();
> 
>  
> 
> edit1 = new QTextEdit(this);
> 
> edit1->setGeometry(5, 35, width()-10, height()-40);
> 
> edit1->show();
> 
>  
> 
> formL = new QFormLayout;
> 
> formL->addRow(("&Name:"), edit1);
> 
> setLayout(formL);
> 
> }
> 
>  
> 
>  Thanks  sujan
> 
> 
> ___
> 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

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


Re: [Interest] How to use unit testing with Qt framework properly

2012-04-11 Thread Samuel Gaist
Hi,

Using the subdir template, you would only have one project opened in Creator, 
all the other "subproject" are contained in it. So only one build to manage and 
you can select which test you'd like to run in the run settings panel. And if 
you want to run them all every time you build, add a buildstep with "check" as 
Make arguments.

Samuel

On 10 avr. 2012, at 22:31, Gilles Habran wrote:

> Hi again,
> 
> I created a dummy project to test some things. You can find the project here 
> : https://bitbucket.org/hiveNzin0/qtunittest
> 
> I would like to know if it is "clean" to do like I did in the main.cpp in 
> tests/unitTests ? That's the result I wanted. 
> I tried to create on project for each class but I don't think I would like to 
> have too many open projects in Qt Creator for instance (I still need 
> experience in Unit Testing) and I still don't know how to setup this.
> 
> I still have problems to link correctly my main project and my test project 
> as you can see in the unitTests.pro, I'm still looking for informations about 
> that.
> 
> Any advise appreciated. :)
> 
> Thanks.
> 
> Regards,
> 
> GH
> 
> On 10 April 2012 16:19, Gilles Habran  wrote:
> Hi,
> 
> thanks again for all the informations. I think I will create another test 
> project to experiment a lot with the Qt Test Lib and see what I can do and 
> not do.
> 
> I didn't understand how you call them automatically when you do automated 
> test proc. You have one main for each file (test class), do you create 
> another main somewhere that call all the tests ?
> 
> What I would like to achieve is 
> 1) run small unit tests for a class only for example
> 2) run all the available tests in folder tests for example
> 
> I suppose I will have to do it your way.
> 
> Is it really a good way to do when you separate the app (I suppose the main) 
> and create a library with all the other class/... ? I am trying to see the 
> pros and cons of this. I checked with some KDE projects and I only saw 
> KTorrent with the separation. I will try to find projects that use Qt test 
> lib or KDE test lib (if such thing exists) and see how they do it.
> 
> How should I do to link my main project with my tests projects if I don't 
> want to create a library for my main project ?
> 
> Is there any documentation that explains that kind of thing (static link, 
> dynamic link, create library, ... and how to use that with unit test 
> compilation) ?
> 
> I don't know if what I say make sense or not so feel free to ask if it is 
> unclear. :)
> 
> Thanks again for your help.
> 
> 
> On 10 April 2012 11:48, Samuel Gaist  wrote:
> The best answer i can give you is: it depends. I like to have a test project 
> per class so i can run them manually while writing the related class and have 
> them automatically called when doing automated test procedures.
> 
> Have a look at the subdir template. Basically, you will end with several 
> subdirs "project" :
> MyProject.pro -> subdir template
> 
> apps/apps.pro -> subdir template
> apps/myapp/myapp.pro -> app template
> 
> libs.pro -> subdir template
> libs/xxx/xxx.pro -> subdir template
> libs/xxx/src/src.pro -> lib template
> libs/xxx/test/test.pro -> subdir template
> 
> It is one way of doing it, might not be the best, but works well for me.
> 
> Hope its helps
> Samuel
> 
> On 10 avr. 2012, at 11:05, Gilles Habran wrote:
> 
> > Hi,
> >
> > I have to look for informations about how to separate my project to create 
> > a library then.
> >
> > Is it better to have a small project for each test class ? I have poor 
> > knowledge of unit testing of course but wouldn't it be more clear to have a 
> > big project containing all the unit test to start from time to time... but 
> > maybe it is different for TDD since you have to run the tests very often so 
> > you don't have to wait all the tests for the entire project to finish.
> >
> > I think I need a big tutorial. :)
> >
> > Thanks again.
> >
> > GH
> >
> > On 10 April 2012 10:43, Samuel Gaist  wrote:
> >
> > On 10 avr. 2012, at 10:29, Gilles Habran wrote:
> >
> > > Hi guys,
> > >
> > > I have a personal project and I would like to try to use Test Driven 
> > > Development. For the moment, my only knowledge in Unit Tests come from 
> > > several books, I never really use that concept in a project.
> > >
> > > Here is the arch of my project folder :
> > >
> > > xxx/xxx.pro
> > > xxx/src/*.cpp
> &g

Re: [Interest] How to use unit testing with Qt framework properly

2012-04-10 Thread Samuel Gaist
The best answer i can give you is: it depends. I like to have a test project 
per class so i can run them manually while writing the related class and have 
them automatically called when doing automated test procedures.

Have a look at the subdir template. Basically, you will end with several 
subdirs "project" :
MyProject.pro -> subdir template

apps/apps.pro -> subdir template
apps/myapp/myapp.pro -> app template

libs.pro -> subdir template
libs/xxx/xxx.pro -> subdir template
libs/xxx/src/src.pro -> lib template
libs/xxx/test/test.pro -> subdir template

It is one way of doing it, might not be the best, but works well for me.

Hope its helps
Samuel

On 10 avr. 2012, at 11:05, Gilles Habran wrote:

> Hi,
> 
> I have to look for informations about how to separate my project to create a 
> library then.
> 
> Is it better to have a small project for each test class ? I have poor 
> knowledge of unit testing of course but wouldn't it be more clear to have a 
> big project containing all the unit test to start from time to time... but 
> maybe it is different for TDD since you have to run the tests very often so 
> you don't have to wait all the tests for the entire project to finish.
> 
> I think I need a big tutorial. :)
> 
> Thanks again.
> 
> GH
> 
> On 10 April 2012 10:43, Samuel Gaist  wrote:
> 
> On 10 avr. 2012, at 10:29, Gilles Habran wrote:
> 
> > Hi guys,
> >
> > I have a personal project and I would like to try to use Test Driven 
> > Development. For the moment, my only knowledge in Unit Tests come from 
> > several books, I never really use that concept in a project.
> >
> > Here is the arch of my project folder :
> >
> > xxx/xxx.pro
> > xxx/src/*.cpp
> > xxx/include/*.h
> > xxx/obj/*.o
> > xxx/bin/
> >
> > xxx/tests/yyy.pro
> > xxx/tests/*.cpp & *.h
> >
> > So I have two projects, one for the main project and one for the tests, 
> > because I read that it's better that the tests do not mess with the project 
> > and I agree with that.
> >
> > For my test project, I plan to have a main.cpp that controls all the tests 
> > and my tests classes like this : testAAA.cpp+testAAA.h
> >
> > My problem is that I don't know how to "link" my project with unit tests to 
> > my main project.
> > I read that I should either link my main project object files (.o) with my 
> > test project or have some .so to link to (my main project is not a library, 
> > it will have a GUI, DB access, XML, ... so how should I get that .so ?) or 
> > finally, add all the files mainProject.cpp and mainProject.h to the unit 
> > tests project to have access to them while compiling the project with unit 
> > tests.
> >
> > Can someone help me with documentation or good practice with unit testing 
> > with Qt (blog post, ...) ?
> >
> > I already have read the documentation for Qt Test Lib and I tested it (I 
> > included the .cpp in my test project files but it seemed really ugly) and 
> > it worked fine so I just need advises how to do it the proper way.
> >
> > Thanks a lot.
> >
> > Kind regards,
> >
> > GH
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 
> Hello,
> 
> What I personally do for TDD with Qt is to develop all basic elements of my 
> application in one or more libraries and then the application uses these 
> elements so the hierarchy pretty much looks like this:
> 
> MyProject/apps/xxx
> MyProject/libs/xxx
> 
> In the library I have:
> xxx/xxx.pro
> xxx/src/*.cpp/*.h
> xxx/test/test.pro
> xxx/test/test.pri
> xxx/test/tst_class1
> xxx/test/tst_class2
> 
> 
> tst_class1/tst_class1.pro
> tst_class1/tst_class1.cpp
> 
> So each class has its own unit test.
> 
> test.pri contains all the stuff that is needed to link against libxxx.so 
> (dylib, dll etc...) and is included by all tst_xxx.pro
> 
> Hope this helps
> Samuel
> 
> ___
> 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] How to use unit testing with Qt framework properly

2012-04-10 Thread Samuel Gaist

On 10 avr. 2012, at 10:29, Gilles Habran wrote:

> Hi guys,
> 
> I have a personal project and I would like to try to use Test Driven 
> Development. For the moment, my only knowledge in Unit Tests come from 
> several books, I never really use that concept in a project.
> 
> Here is the arch of my project folder :
> 
> xxx/xxx.pro
> xxx/src/*.cpp
> xxx/include/*.h
> xxx/obj/*.o
> xxx/bin/
> 
> xxx/tests/yyy.pro
> xxx/tests/*.cpp & *.h
> 
> So I have two projects, one for the main project and one for the tests, 
> because I read that it's better that the tests do not mess with the project 
> and I agree with that.
> 
> For my test project, I plan to have a main.cpp that controls all the tests 
> and my tests classes like this : testAAA.cpp+testAAA.h
> 
> My problem is that I don't know how to "link" my project with unit tests to 
> my main project. 
> I read that I should either link my main project object files (.o) with my 
> test project or have some .so to link to (my main project is not a library, 
> it will have a GUI, DB access, XML, ... so how should I get that .so ?) or 
> finally, add all the files mainProject.cpp and mainProject.h to the unit 
> tests project to have access to them while compiling the project with unit 
> tests.
> 
> Can someone help me with documentation or good practice with unit testing 
> with Qt (blog post, ...) ? 
> 
> I already have read the documentation for Qt Test Lib and I tested it (I 
> included the .cpp in my test project files but it seemed really ugly) and it 
> worked fine so I just need advises how to do it the proper way.
> 
> Thanks a lot.
> 
> Kind regards,
> 
> GH
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hello,

What I personally do for TDD with Qt is to develop all basic elements of my 
application in one or more libraries and then the application uses these 
elements so the hierarchy pretty much looks like this:

MyProject/apps/xxx
MyProject/libs/xxx

In the library I have:
xxx/xxx.pro
xxx/src/*.cpp/*.h
xxx/test/test.pro
xxx/test/test.pri
xxx/test/tst_class1
xxx/test/tst_class2


tst_class1/tst_class1.pro
tst_class1/tst_class1.cpp

So each class has its own unit test.

test.pri contains all the stuff that is needed to link against libxxx.so 
(dylib, dll etc...) and is included by all tst_xxx.pro

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


Re: [Interest] post event between threads

2012-04-03 Thread Samuel Gaist
If you show us the code you use to setup the connections, we might be able to 
offer better help.

Samuel

On 3 avr. 2012, at 11:09, Riccardo Roasio wrote:

> I'm trying using signal/slots with Qt::QueuedConnection.
> Now the problem is this one..i have
> 
> - gui thread (main)
> 
> - serial rx thread
> 
> - scriptmanager thread
>|
>|- script runner 1 thread (started from scriptsmanager)
>|
>|- script runner 2 thread (started from scriptsmanager)
>|
>|- script runner N thread (started from scriptsmanager)
> 
> now the event is emitted from serial rx thread
> 
> the main thread is able to catch the signal
> the scriptmanager is able to catch the signal
> the scriptrunner is NOT able to catch the signal
> 
> the only difference is that the sciptrunner has no parent (in the
> construtor the parent is NULL)
> 
> Riccardo
> 
> 
> 
> 
> Il 03 aprile 2012 09:29, Riccardo Roasio  ha 
> scritto:
>> Ok,
>> 
>> i will try!
>> 
>> thanks everybody
>> 
>> Il 03 aprile 2012 09:19, Lincoln Ramsay  ha 
>> scritto:
>>> On 04/03/2012 05:07 PM, ext Riccardo Roasio wrote:
 I cannot use signal/slot because is blocking and i need to continue
 reading from serial port while message is processing...
>>> 
>>> If you emit a signal and the receiver lives on the current thread and
>>> the connect() call did not use Qt::QueuedConnection, then it is
>>> "blocking". If you use Qt::DirectConnection or
>>> Qt::BlockingQueuedConnection then it is always "blocking".
>>> 
>>> But if the receiver lives on another thread or if you specified
>>> Qt::QueuedConnection then the signal puts an object on the event loop
>>> and returns immediately.
>>> 
>>> --
>>> Lincoln Ramsay - Senior Software Engineer
>>> Qt Development Frameworks, Nokia - http://qt.nokia.com/
>>> ___
>>> 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

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


Re: [Interest] post event between threads

2012-04-02 Thread Samuel Gaist
Hi,

If you just want to signal that something has arrived, why not simply use 
signals and slots ? They work across threads.

Hope this helps
Samuel

On 2 avr. 2012, at 18:05, Riccardo Roasio wrote:

> Hi,
> 
> how can i post an event from a thread to another?
> 
> my application have a thread that read from a serial port and another
> thread that wait for something received on the serial port.
> 
> I cannot use postEvent because in one thread i don'e have reference to
> the other...
> 
> How can i do that?
> 
> Thanks,
> Riccardo
> ___
> 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] Get QIcon from NSImage

2012-03-21 Thread Samuel Gaist
Hi,

Convert the NSImage to a QPixmap and then make the QIcon from the pixmap

Hope it helps
Samuel

On 21 mars 2012, at 18:11, Jason Dictos wrote:

> Is there a way to get a QIcon from an NSImage?
> 
> -Jason
> 
> 'Like' us on Facebook for exclusive content and other resources on all 
> Barracuda Networks solutions.
> Visit http://barracudanetworks.com/facebook
> 
> 
> ___
> 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] QSerialport EV_RXCHAR not emitted or catched while moving window

2012-03-15 Thread Samuel Gaist
Again: use the readyRead signal ? 

http://qt-project.org/doc/qt-4.8/qiodevice.html#readyRead

On 15 mars 2012, at 14:27, Riccardo Roasio wrote:

> Sorry..so what you think i have do do?
> 
> 
> 
> Il 15 marzo 2012 14:26, Samuel Gaist  ha scritto:
>> I must say, I don't understand your use of QSerialPort.
>> 
>> You are waiting on data coming from the serial port, aren't you ?
>> So, why not just connect to the readyRead signal ?
>> 
>> On 15 mars 2012, at 14:07, Riccardo Roasio wrote:
>> 
>>> the serial port class is this one:
>>> 
>>> http://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCwQFjAA&url=http%3A%2F%2Fgitorious.org%2Finbiza-labs%2Fqserialport&ei=8OhhT_vNGY6KhQeg6tieCA&usg=AFQjCNF7vwKcu_dJz8y-QE6ziYhoPe4uNw&sig2=adTbs9FuJPYZhrNXtnfALg
>>> 
>>> it expect a EV_RXCHAR event on receiving something on the serial port
>>> so it reimplements the QWidget event function:
>>> 
>>> bool WinSerialPortEngine::event(QEvent *e)
>>> {
>>> //   qDebug()<<"event "<type();
>>>bool ret = false;
>>>if (e->type() == QEvent::WinEventAct) {
>>>if (EV_ERR & m_currentMask & m_setMask) {
>>>m_parent->canErrorNotification();
>>>ret = true;
>>>}
>>> 
>>>if (EV_RXCHAR & m_currentMask & m_setMask)
>>>{
>>>m_parent->canReadNotification();
>>>ret = true;
>>>}
>>> 
>>>//FIXME: This is why it does not work?
>>>if (EV_TXEMPTY & m_currentMask & m_setMask) {
>>>m_parent->canWriteNotification();
>>>ret = true;
>>>    }
>>>}
>>>else
>>>{
>>> ret = QWinEventNotifier::event(e);
>>>}
>>> 
>>>::WaitCommEvent(m_descriptor, &m_currentMask, &m_ov);
>>>return ret;
>>> }
>>> 
>>> the problem is that while receiving events like the
>>> QEvent::NonClientAreaMouseButtonPres on the gui thread it stop
>>> receivng EV_RXCHAR event on the serial port class
>>> 
>>> 
>>> 
>>> Il 15 marzo 2012 12:53, Samuel Gaist  ha scritto:
>>>> 
>>>> On 15 mars 2012, at 12:37, Riccardo Roasio wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> i have a program with :
>>>>> 
>>>>> - a main thread
>>>>> - a serial manager thread using Qserialport
>>>>> 
>>>>> i noticed that if i move the main gui the EV_RXCHAR event is not fired
>>>>> or cached...
>>>>> 
>>>>> what's wrong?
>>>>> 
>>>>> thanks,
>>>>> Riccardo
>>>>> ___
>>>>> Interest mailing list
>>>>> Interest@qt-project.org
>>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>> 
>>>> Hi,
>>>> 
>>>> With so few information, we won't be really be able to help you.
>>>> But here is a few questions:
>>>> - How is your serial manager thread implemented ? (My guess: run 
>>>> reimplementation)
>>>> - Do you have signals slots directly connected ?
>>>> 
>>>> Hope this helps
>>>> Samuel
>>>> 
>>>> PS:
>>>> Did you also read this article ?
>>>> http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/
>>>> 
>>>> And there where a few discussions on the qt-nokia mailing list last year 
>>>> about threading, you might want to look for them
>>>> 
>> 

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


Re: [Interest] QSerialport EV_RXCHAR not emitted or catched while moving window

2012-03-15 Thread Samuel Gaist
I must say, I don't understand your use of QSerialPort.

You are waiting on data coming from the serial port, aren't you ?
So, why not just connect to the readyRead signal ?

On 15 mars 2012, at 14:07, Riccardo Roasio wrote:

> the serial port class is this one:
> 
> http://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCwQFjAA&url=http%3A%2F%2Fgitorious.org%2Finbiza-labs%2Fqserialport&ei=8OhhT_vNGY6KhQeg6tieCA&usg=AFQjCNF7vwKcu_dJz8y-QE6ziYhoPe4uNw&sig2=adTbs9FuJPYZhrNXtnfALg
> 
> it expect a EV_RXCHAR event on receiving something on the serial port
> so it reimplements the QWidget event function:
> 
> bool WinSerialPortEngine::event(QEvent *e)
> {
> //   qDebug()<<"event "<type();
>bool ret = false;
>if (e->type() == QEvent::WinEventAct) {
>if (EV_ERR & m_currentMask & m_setMask) {
>m_parent->canErrorNotification();
>ret = true;
>}
> 
>if (EV_RXCHAR & m_currentMask & m_setMask)
>{
>m_parent->canReadNotification();
>ret = true;
>}
> 
>//FIXME: This is why it does not work?
>if (EV_TXEMPTY & m_currentMask & m_setMask) {
>m_parent->canWriteNotification();
>ret = true;
>}
>}
>else
>{
> ret = QWinEventNotifier::event(e);
>}
> 
>::WaitCommEvent(m_descriptor, &m_currentMask, &m_ov);
>return ret;
> }
> 
> the problem is that while receiving events like the
> QEvent::NonClientAreaMouseButtonPres on the gui thread it stop
> receivng EV_RXCHAR event on the serial port class
> 
> 
> 
> Il 15 marzo 2012 12:53, Samuel Gaist  ha scritto:
>> 
>> On 15 mars 2012, at 12:37, Riccardo Roasio wrote:
>> 
>>> Hi,
>>> 
>>> i have a program with :
>>> 
>>> - a main thread
>>> - a serial manager thread using Qserialport
>>> 
>>> i noticed that if i move the main gui the EV_RXCHAR event is not fired
>>> or cached...
>>> 
>>> what's wrong?
>>> 
>>> thanks,
>>> Riccardo
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
>> Hi,
>> 
>> With so few information, we won't be really be able to help you.
>> But here is a few questions:
>> - How is your serial manager thread implemented ? (My guess: run 
>> reimplementation)
>> - Do you have signals slots directly connected ?
>> 
>> Hope this helps
>> Samuel
>> 
>> PS:
>> Did you also read this article ?
>> http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/
>> 
>> And there where a few discussions on the qt-nokia mailing list last year 
>> about threading, you might want to look for them
>> 

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


Re: [Interest] QSerialport EV_RXCHAR not emitted or catched while moving window

2012-03-15 Thread Samuel Gaist

On 15 mars 2012, at 12:37, Riccardo Roasio wrote:

> Hi,
> 
> i have a program with :
> 
> - a main thread
> - a serial manager thread using Qserialport
> 
> i noticed that if i move the main gui the EV_RXCHAR event is not fired
> or cached...
> 
> what's wrong?
> 
> thanks,
> Riccardo
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

With so few information, we won't be really be able to help you.
But here is a few questions:
- How is your serial manager thread implemented ? (My guess: run 
reimplementation)
- Do you have signals slots directly connected ?

Hope this helps
Samuel

PS:
Did you also read this article ?
http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/

And there where a few discussions on the qt-nokia mailing list last year about 
threading, you might want to look for them

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


Re: [Interest] QExtSerialPort

2012-02-27 Thread Samuel Gaist
Hello,

Simply download the source :

hg clone https://code.google.com/p/qextserialport/

Hope this helps,
Samuel

On 27 févr. 2012, at 17:45, Duane wrote:

> We've been using QextSerialPort for some MS specific programs.  Now that 
> we need to port to Linux, there is a problem using events for writes.
> 
> I'm looking for a more recent version.  Does anyone know where to 
> download it?  It seems that it's been moved from sourceforge to 
> code.google.com/...  but I don't see a download link at that site.
> 
> ___
> 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] console and gui

2012-02-14 Thread Samuel Gaist

On 14 févr. 2012, at 12:29, Graham Labdon wrote:

> Hi
> I have the following requirement –
> If my Qt Gui app is running in debug mode a console should be displayed and 
> this should be able to display log messages
> If in release mode the log messages are to be sent to a file.
>  
> I have looked at the QsLogger package but this will only send messages to a 
> file
>  
> Does anyone know how this could be achieved?
>  
> Thanks
>  
>  
> Graham
>  
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You could be interested by:

http://www.kdab.com/kd-tools

Their log related classes provide what you need

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


Re: [Interest] Problems with Drag and Drop in Windows 7

2012-01-25 Thread Samuel Gaist
In my case they are reached. Are you building your application in debug or 
release mode ?

In release mode, it won't break. Furthermore a line like int n = 0; is likely 
to get optimized out.

If you want to have the correct behavior, do as said in the documentation with 
the acceptProposedAction()


On 25 janv. 2012, at 16:56, noru...@me.com wrote:

> But the main problem is that the breakpoint in the functions aren't reached.
> 
> Make a breakpoint on a line (int n = 0;) in the code and run in debug mode
> 
> Am 25.01.2012 um 16:48 schrieb Samuel Gaist :
> 
>> 
>> On 25 janv. 2012, at 15:44, NoRulez wrote:
>> 
>>> Hello again,
>>> 
>>> I've attached a small and simple example, which doesn't work.
>>> 
>>> Maybe someone could help
>>> 
>>> Thanks in advance
>>> Best Regards
>>> 
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
>> Hello,
>> 
>> Tested with mingw 4.4.0 as well as MSVC2008.
>> 
>> Indeed, your example won't work as it is. You need to accept the proposed 
>> action (event->acceptProposedAction()) in dragEnterEvent and dragMoveEvent 
>> and just accept the event (event->accept()) in dragLeaveEvent.
>> 
>> In dropEvent, you have to do your stuff and again acceptProposedAction().
>> 
>> Hope it helps
>> Samuel


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


Re: [Interest] Problems with Drag and Drop in Windows 7

2012-01-25 Thread Samuel Gaist

On 25 janv. 2012, at 15:44, NoRulez wrote:

> Hello again,
> 
> I've attached a small and simple example, which doesn't work.
> 
> Maybe someone could help
> 
> Thanks in advance
> Best Regards
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hello,

Tested with mingw 4.4.0 as well as MSVC2008.

Indeed, your example won't work as it is. You need to accept the proposed 
action (event->acceptProposedAction()) in dragEnterEvent and dragMoveEvent and 
just accept the event (event->accept()) in dragLeaveEvent.

In dropEvent, you have to do your stuff and again acceptProposedAction().

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


Re: [Interest] Custom text objects

2012-01-05 Thread Samuel Gaist

On 5 janv. 2012, at 12:56, Graham Labdon wrote:

> Hi
> I have implemented the insertion of custom objects into  a QTextEdit by 
> following the ‘insert SVG image’ example.
>  
> I now want to detect when such an object is deleted, does anybody know how I 
> can achieve this
>  
> Thanks
>  
> Graham
>  
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

Did you try to use the destroyed signal from QObject ?

http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#destroyed

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


Re: [Interest] Logging best practice.

2011-12-09 Thread Samuel Gaist

On 9 déc. 2011, at 10:31,   wrote:

> Hi,
> 
>> -Original Message-
>> From: interest-bounces+kai.koehne=nokia@qt-project.org
>> [mailto:interest-bounces+kai.koehne=nokia@qt-project.org] On Behalf
>> Of ext alex.blas...@nokia.com
>> Sent: Thursday, December 01, 2011 7:28 PM
>> To: stefano.cordibe...@edalab.it; interest@qt-project.org
>> Subject: Re: [Interest] Logging best practice.
>> 
>> 
>> 
>>> -Original Message-
>>> From: interest-bounces+alex.blasche=nokia@qt-project.org
>>> [mailto:interest-bounces+alex.blasche=nokia@qt-project.org] On
>> 
>>>is the state of the art use the debug functions (qDebug, qWarning,
>>> ...) in conjunction with a custom message handler (qInstallMsgHandler)
>>> for log to file system?
>>> I found very simple and useful this approach, but I think that a log
>>> function with message level is needed (i.e: qMessage() ) for a
>>> complete set of logging levels.
>>> Anyone else think that we need a new function with message log level?
>> 
>> I do. We are actually working on something based on qLog
>> (http://docs.huihoo.com/qt/qtextended/4.4/debug-qtextended.html#qlog-
>> categorized-logging)
>> 
>> Initially we only started to look at it because we needed something in
>> QtSensors but I definitely see this as a more generic thing. Besides porting 
>> it
>> to Qt5 we are still investigating its usefulness as a generic Qt5 thing. We
>> should soon have some preliminary results.
> 
> I for one would really like to have an improved logging framework in Qt5 :)
> 
> Since it's Christmas soon, I'd like to add one thing to the wishlist : A way 
> to add a file/line info to the log. This way you'd be able to see where in 
> the source code a specific message was raised . 
> 
> Syntax could e.g. be:
> 
> qLog(QWidget).location(__FILE__, __LINE__) << "Created" << name;
> 
> (Maybe __FILE__ , __LINE__ can be automatically retrieved by yet another 
> macro? Not sure ...).  
> 
> For logs coming from .js (console.log(), console.debug() ...) the source 
> location would automatically be set. 
> 
> Just  my 2 cents,
> 
> Kai
> 
>> So I guess, watch this space...
>> 
>> --
>> Alex

Hi,
do you think about about something like Q_FUNC_INFO ?

http://doc.qt.nokia.com/4.7/qtglobal.html#Q_FUNC_INFO

Hope it helps
Samuel

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