Re: [Interest] QLIneEdit Bug still valid ?

2012-07-17 Thread Andre Somers

Op 17-7-2012 2:51, Constantin Makshin schreef:

I can't say for sure, but most probably yes.
You'd have to check to see if that does not block the emission of the 
signal then after the user edited the text. Does anyone know what the 
signal emission order _should_ be in case where a user edits the line 
edit, and the validator corrects that input?


André



On 07/17/2012 04:10 AM, Petric Frank wrote:

Hello René,

so patching this location to pass false as additional third parameter should
fix the issue, right ?

regards
   Petric

Am Dienstag, 17. Juli 2012, 01:06:43 schrieb Constantin Makshin:

It works incorrectly only when the validator changes the text.

The cause is QLineControl::fixup() (src/gui/widgets/qlinecontrol.cpp,
line 387) --- it calls QLineControl::internalSetText() with only 2
parameters, omitting the one that controls emission of the textEdited()
signal. And since that parameter defaults to 'true', you get what you get.

On 07/16/2012 03:38 PM, R. Reucher wrote:

On Monday 16 July 2012 09:14:31 Constantin Makshin wrote:

Functions you are interested in are (line numbers are taken from the
code in the Git repository):
src/gui/widgets/qlineedit.cpp, line 383 (QLineEdit::setText)
src/gui/widgets/qlinecontrol_p.h, line 213 (QLineControl::setText)
src/gui/widgets/qlinecontrol.cpp, line 676
(QLineControl::internalSetText) src/gui/widgets/qlinecontrol.cpp, line
620 (QLineControl::finishChange)

Nothing looks wrong there...

Yeah, I also recall it was working correctly when I used it last time...

However, the example acts wrongly, but it somehow only happens when
the validator is set. The attached example (w/o the validator) works
correctly.

HTH, René



___
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] jpeg dependency fix on kubuntu 12.04

2012-07-17 Thread Harri Pasanen
Huh?   QtSDK or qtcreator are not ubuntu/debian packages.  Maybe 
something else is affected by this dependency, but I'm not aware what.


It would be great though if

  sudo apt-get install qtsdk

would work out of the box, especially for Qt5.   I wonder if anyone is 
working on that?  This is perhaps more for the development list



On 07/17/2012 07:08 AM, Joseph Crowell wrote:
Might be better to list package dependency problems to the package 
mangers forums/mailing list at Canonical.


On Fri, Jul 13, 2012 at 4:49 PM, Harri Pasanen ha...@mpaja.com 
mailto:ha...@mpaja.com wrote:


FYI,  I just installed a new linux box with Kubuntu 12.04 amd64.

I then proceeded to install QtSDK 1.2.1, and qt-creator 2.5.0.

Everything seemed to work, except jpg images where not showing up,
instead I got the message:

QML Image: Error decoding: qrc:/res/texture2.jpg: Unsupported
image format



After some digging, I found at the missing dependency:

  sudo apt-get install libjpeg62

was required to fix this.

I figured I'll document this here, just in case someone else runs
into this...

Harri

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




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



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


Re: [Interest] QTcpSocket from QTcpServer

2012-07-17 Thread Lucas.Betschart
Thanks for the answer, I've found the problem.
I called a Qt Slots from outside my object from a non Qt-Thread (std. Linux 
thread).

I've fixed the problem by call a function of my (Qt) instance which emits a 
signal that is connected to my slot.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Problem understanding QAbstractProxyModel::mapFromSource and displaying summary data from a model

2012-07-17 Thread h
Hi,
 I am writing an app in which I am wanting to display my data in a number of 
different ways.  (Currently QT4.8 on linux, but will also run it on windows, 
if this is relevant!)

As an example what I have is a set of tuples with two field, say 
Name and Hours

I have this working with table view and am able to access and edit the data.

What I want is a not editable view of the data which shows the total of all 
the Hours for each Name. 

I have used the QAbstractProxyModel class to do this.

My problem is I do not know how to implement the mapTosource and mapFromSource 
functions as there is not a direct 1 to 1 correlation between indexes in the 
proxy model and indexes in the source model.  The function definitions appear 
to assume that this is the case.

I have done a basic implementation of these functions which returns a default 
QModelIndex.
The part I have found which is not working is that that the summary  or total 
view does not update when I change values in the other view.I have changed 
the emit in the setData function to cover the whole model.

The summary view does update when it gets focus.

Can someone please tell me if there is something better  than the 
QAbstractProxyModel for me to use for this purpose and

How is the mapFromSource function suppose to work when there is not a 1:1 
mapping between the abstract model and the source model?

Are there any samples of QAbstractProxyMode available?


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


Re: [Interest] Problem understanding QAbstractProxyModel::mapFromSource and displaying summary data from a model

2012-07-17 Thread Tony Rietwyk
 Sent: Wednesday, 18 July 2012 2:28 PM
 
 Hi,
  I am writing an app in which I am wanting to display my data in a number
of
 different ways.  (Currently QT4.8 on linux, but will also run it on
windows, if
 this is relevant!)
 
 As an example what I have is a set of tuples with two field, say Name and
 Hours
 
 I have this working with table view and am able to access and edit the
data.
 
 What I want is a not editable view of the data which shows the total of
all the
 Hours for each Name.
 
 I have used the QAbstractProxyModel class to do this.
 
 My problem is I do not know how to implement the mapTosource and
 mapFromSource functions as there is not a direct 1 to 1 correlation
between
 indexes in the proxy model and indexes in the source model.  The function
 definitions appear to assume that this is the case.
 
 I have done a basic implementation of these functions which returns a
 default QModelIndex.
 The part I have found which is not working is that that the summary  or
total
 view does not update when I change values in the other view.I have
 changed
 the emit in the setData function to cover the whole model.
 
 The summary view does update when it gets focus.
 
 Can someone please tell me if there is something better  than the
 QAbstractProxyModel for me to use for this purpose and
 
 How is the mapFromSource function suppose to work when there is not a 1:1
 mapping between the abstract model and the source model?
 
 Are there any samples of QAbstractProxyMode available?
 
 
 With thanks,
 Hugh

Hi, 

I think QAbstractProxyModel only applies when there IS a direct mapping
between the elements of each model, that maintains their identity.  

You need a model with an element for each group (or grouping level), that
listens for the changes in the source model and adjusts the group's summary,
then signals the change for that one group.  

The QML VisualDataModel component looks like it has grouping capabilities.
Maybe you can get some ideas from its implementation? 

Hope that helps, 

Tony.


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