Re: [Interest] QLIneEdit Bug still valid ?

2012-07-19 Thread André Somers
Op 17-7-2012 9:45, Tony Rietwyk schreef:
 Hi,

 A much easier solution to disconnecting the signals, is to set a flag before 
 calling setText, then check that in the slot.

 Hope that helps,

 Tony

Or use QObject::blockSignals(true) on the line edit before you set the 
text, and the same with false afterwards. Seems easier to manage than 
another boolean flag somewhere, because it stays local to the place 
where you do the actual invokation. The flag would need code at three 
places: around the invokation, in the header as a member variable, and 
in the slot implementation when it is checked.

André

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


[Interest] About qxmlstream

2012-07-19 Thread song.7.liu
Hi,

Can the Qt XML handle the content as below ?

title Hello /

Any help is appreciated ;)

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


[Interest] Qt Binaries for Mingw 4.7

2012-07-19 Thread Konrad Rosenbaum
Hi,

I'm using features of C++11 (provided by GCC 4.7, and maybe LLVM 3.1) in my 
projects, which is fine for Linux, but there are some problems on Windows. 
Moving back to an earlier GCC is not an option - I'd rather drop Windows-
Support (I've already dropped Mac for the same reason).

If I use the official Qt 4.8.2 binary package for Mingw 4.4 the application 
crashes immediately on start when it is trying to initialize itself. I presume 
a Qt compiled with Mingw4.4 is incompatible with a project compiled with Mingw 
4.7 - is this correct?

I'm also trying to compile Qt myself - after several days it is still in the 
middle of compiling the Webkit module. I know compiling on windows is slow - 
but this bad? Windows runs in a VirtualBox VM, Guest Utils are installed, the 
sources and Mingw are in a shared folder. I would try to move everything to a 
virtual hard disk next - does anyone know whether this would help?

Any hints on how I could solve my dilemma?

Does anyone provide a complete binary package for Qt 4.8.2 compiled with 
Mingw4.7?



Konrad


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


Re: [Interest] Qt Binaries for Mingw 4.7

2012-07-19 Thread Yves Bailly
Hello Konrad,

Le 19/07/2012 10:07, Konrad Rosenbaum a écrit :

 Does anyone provide a complete binary package for Qt 4.8.2 compiled with
 Mingw4.7?

Are you trying 32bits or 64bits builds?

The only really working 64bits MinGW I ever found is the one from TDM
(http://tdm-gcc.tdragon.net/, also probably the easiest to install), but for 
now, no 4.7.x
release available...
Are you using MinGW-w64? Is is usable without MSYS, and installable without too 
much troubles?

I'd be more than glad to try such a build, targetting 64bits binaries.

Regards,

-- 
  /- Yves Bailly - Software developper  -\
  \- Sescoi RD  - http://www.sescoi.fr -/
The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] About qxmlstream

2012-07-19 Thread Till Oliver Knoll
2012/7/19  song.7@nokia.com:

 Can the Qt XML handle the content as below ?

No, it only handles XML, as the name implies ;)

 title Hello /

That's not valid XLM, see http://www.w3.org/TR/REC-xml/#NT-Name

That would be a valid possibility:

  title text=Hello /

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


Re: [Interest] QLIneEdit Bug still valid ?

2012-07-19 Thread Bo Thorsen
Den 17-07-2012 10:22, André Somers skrev:
 Op 17-7-2012 9:45, Tony Rietwyk schreef:
 Hi,
 
 A much easier solution to disconnecting the signals, is to set a flag 
 before calling setText, then check that in the slot.
 
 Hope that helps,
 
 Tony
 
 Or use QObject::blockSignals(true) on the line edit before you set the
 text, and the same with false afterwards.

Ah, you just hit one of my pet peeves :) When doing stuff like this, 
create a class for it. Simpler to reuse and exception safe. For this 
exact problem (blockSignals) I have the code on my blog:

http://www.fioniasoftware.dk/blog/?p=158

The code is trivial. But getting the habit of using objects for this 
kind of problem is pretty important.

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QLIneEdit Bug still valid ?

2012-07-19 Thread André Somers
Op 19-7-2012 11:54, Bo Thorsen schreef:
 Den 17-07-2012 10:22, André Somers skrev:
 Op 17-7-2012 9:45, Tony Rietwyk schreef:
 Hi,

 A much easier solution to disconnecting the signals, is to set a flag 
 before calling setText, then check that in the slot.

 Hope that helps,

 Tony

 Or use QObject::blockSignals(true) on the line edit before you set the
 text, and the same with false afterwards.
 Ah, you just hit one of my pet peeves :) When doing stuff like this,
 create a class for it. Simpler to reuse and exception safe. For this
 exact problem (blockSignals) I have the code on my blog:

 http://www.fioniasoftware.dk/blog/?p=158

 The code is trivial. But getting the habit of using objects for this
 kind of problem is pretty important.

 Bo Thorsen,
 Fionia Software.

That's exactly what I do for these kinds of things, though there are 
many more of these pairs to be found in Qt that would benefit of a RAII 
class. Setting the bussy cursor and SQL transactions are just two of 
them, next to blocking signals of course...

André


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


[Interest] User interactions on webpage in Qtwebkit browser!

2012-07-19 Thread Lata Agrawal
Hi all,

I have following requirement and I have no clue how to go ahead with this:
I am loading a webpage in QtWebkit browser. I want to log all user
interactions with the webpage like clicking on a button, image, text entry
etc.

I am not sure how to approach this problem. Any pointers would be helpful.

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


Re: [Interest] User interactions on webpage in Qtwebkit browser!

2012-07-19 Thread Igor Grivko

Hi Lata,

I can suggest to look at the


 voidQWebView::linkClicked( constQUrl qurl.html/url/)[signal]

This signal is emitted whenever the user clicks on a link and the page's 
linkDelegationPolicy property is set to delegate the link handling for 
the specified/url/.


*See also*QWebPage::linkDelegationPolicy 
qwebpage.html#linkDelegationPolicy-prop().



This is a signal that is emitted when a user clicks a link in a WebView.

You can add your own Event Filter, and then you can monitor all the 
Mouse events, for instance.


Hope it helps.

Best regards,
Igor Grivko


On 07/19/2012 05:41 PM, Lata Agrawal wrote:

Hi all,

I have following requirement and I have no clue how to go ahead with this:
I am loading a webpage in QtWebkit browser. I want to log all user 
interactions with the webpage like clicking on a button, image, text 
entry etc.


I am not sure how to approach this problem. Any pointers would be 
helpful.


-- Regards,
Lata



___
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] QLIneEdit Bug still valid ?

2012-07-19 Thread Tony Rietwyk
Andre said

 Sent: Tuesday, 17 July 2012 6:22 PM
 
 Op 17-7-2012 9:45, Tony Rietwyk schreef:
  Hi,
 
  A much easier solution to disconnecting the signals, is to set a flag
before
 calling setText, then check that in the slot.
 
  Hope that helps,
 
  Tony
 
 Or use QObject::blockSignals(true) on the line edit before you set the
text,
 and the same with false afterwards. Seems easier to manage than another
 boolean flag somewhere, because it stays local to the place where you do
 the actual invokation. The flag would need code at three
 places: around the invokation, in the header as a member variable, and in
the
 slot implementation when it is checked.
 
 André

Hi André, 

I don't use blockSignals because the side effects are undocumented.  The
problem is that ALL signals are blocked, not just the specific call to your
slot.  Lots of things rely on the changed signal from QLineEdit - attached
models and complex widgets, like QComboBox, for example.  Also, from reading
the Qt code in general, there is often a complex web of internal signals
between the public and private interfaces, and I've always assumed they are
affected as well (?).  

Tony


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


Re: [Interest] About qxmlstream

2012-07-19 Thread Till Oliver Knoll

Am 19.07.2012 um 17:57 schrieb song.7@nokia.com:

 Thanks, finally the DOM is used for this case, thanks ;)

What do you mean for this case?! And I assume you're referring to the 
(deprecated!) QDomDocument API.

Well, that *still* doesn't make your example valid XML (not even valid HTML): 
in case QDomDocument doesn't terribly throw up and spit out your input then 
either because its more error-forgiving than I thought, there's a bug which 
doesn't detect the garbage input you're feeding it with - or you are simply 
/ignoring/ the error it raises!

In any case, what would you expect would/should be the generated output? An 
empty DOM node named title Hello (not possible, refer again to the link I 
sent previously: whitespace is NOT part of a tag name!)?

Or a DOM node with an unnamed (!) attribute? Or a text DOM node with content 
Hello?! Not going to happen...


So better fix the input (and/or your code)!

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


Re: [Interest] Qt Binaries for Mingw 4.7

2012-07-19 Thread Yang Fan
I'm using MinGW with GCC 4.7.1 got from
http://sourceforge.net/projects/mingwbuilds/, it works fine for Qt 4.8.1
and Qt 4.8.2.

On Thu, Jul 19, 2012 at 4:07 PM, Konrad Rosenbaum kon...@silmor.de wrote:

 Hi,

 I'm using features of C++11 (provided by GCC 4.7, and maybe LLVM 3.1) in my
 projects, which is fine for Linux, but there are some problems on Windows.
 Moving back to an earlier GCC is not an option - I'd rather drop Windows-
 Support (I've already dropped Mac for the same reason).

 If I use the official Qt 4.8.2 binary package for Mingw 4.4 the application
 crashes immediately on start when it is trying to initialize itself. I
 presume
 a Qt compiled with Mingw4.4 is incompatible with a project compiled with
 Mingw
 4.7 - is this correct?

 I'm also trying to compile Qt myself - after several days it is still in
 the
 middle of compiling the Webkit module. I know compiling on windows is slow
 -
 but this bad? Windows runs in a VirtualBox VM, Guest Utils are installed,
 the
 sources and Mingw are in a shared folder. I would try to move everything
 to a
 virtual hard disk next - does anyone know whether this would help?

 Any hints on how I could solve my dilemma?

 Does anyone provide a complete binary package for Qt 4.8.2 compiled with
 Mingw4.7?



 Konrad

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




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


Re: [Interest] About qxmlstream

2012-07-19 Thread Jason H


Absolutely true.
condition data=sunny /  -- you need to call elementNode.attribute(data)
conditionsunny/condition -- you can call readNodeText() or 
elementNode,text()

One is an attribute, the other is a text node of an element node. You need to 
read up on XML if you do not understand the difference. w3schools.com is a 
good, quick reference



From: wenjun.ji...@nokia.com wenjun.ji...@nokia.com
To: scorp...@yahoo.com; song.7@nokia.com; interest@qt-project.org 
Sent: Thursday, July 19, 2012 10:08 PM
Subject: RE: [Interest] About qxmlstream



Hi,

Thanks for the reply!

I tried QXmlStreamReader to parse xml like:
current_conditions  
condition data=sunny /  
temp_f data=52 /  
temp_c data=11 /  
humidity data= 33% /  
icon data=/ig/images/weather/sunny.gif /  
wind_condition data=strong /  
 /current_conditions  

By using  readElementText () to read the content of “condition” from condition 
data=sunny /, that will return a null string .
If change the xml as  condition “sunny” /condition, right string will be 
returned.

Best regards!
-Jiang wenjun

From:ext Jason H [mailto:scorp...@yahoo.com] 
Sent: Thursday, July 19, 2012 9:21 PM
To: Liu Song.7 (Nokia-MP/Beijing); interest@qt-project.org
Cc: Jiang Wenjun (Nokia-MP/Beijing)
Subject: Re: [Interest] About qxmlstream

I don't know that that is valid XML.

Your options are:
titleHello/title
title some_attribute_name=Hello/

Otherwise what you are dealing with only looks like HTML.
You might run it through a converter.






From:song.7@nokia.com song.7@nokia.com
To: interest@qt-project.org 
Cc: wenjun.ji...@nokia.com 
Sent: Thursday, July 19, 2012 3:56 AM
Subject: [Interest] About qxmlstream

Hi,

Can the Qt XML handle the content as below ?

titleHello /

Any help is appreciated ;)

Thanks,
Song

___
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