Re: [Interest] invalidated copies of QString in QCommonStyle::cachedOption

2016-01-19 Thread Mojmír Svoboda

On 18.1.2016 14:48, Igor Mironchik wrote:


What if to change QStringLiteral with QLatin1String usage?


Tried it yesterday, and it works without problems as the
reference count in QStringData ensures lifetime of the QString.

I also tried some very dirty way to release the cachedOption
before closing the widget and it worked on a sample. Worth
a try, but not a solution :)

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


Re: [Interest] Qt 5.6.0 beta / Mac / lldb / Debug Symbols

2016-01-19 Thread Nils Jeisecke via Interest
Hi list,

On Thu, Jan 14, 2016 at 1:45 PM, myself wrote:
> However I don't get lldb to display line numbers or show source code for 
> stack frames inside Qt.
Seems that there is no such problem when using the debug version of a
self-compiled Qt library.

Is this an issue with the official release (5.6 beta Mac)?

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


Re: [Interest] invalidated copies of QString in QCommonStyle::cachedOption

2016-01-19 Thread Giuseppe D'Angelo
On Mon, Jan 18, 2016 at 9:40 AM, Mojmír Svoboda  wrote:

> One of the copies is in QCommonStylePrivate::cachedOption::text field. I
> suspect these style classes use some form of sharing, so when i close the
> widget, the copy of qstring will survive the storage, and then when new
> qtableview opens, it tries to reuse the style and on the first use it
> destroys the old content of .text field and crash follows.
>

That is correct. It's an unfortunate side effect of QStrings built like
QStringLiteral does. We've seen that already when unloading plugins which
have handed out QStrings...


> Now what do i do? Try to force somehow the style class to drop the
> d->cachedOption?
> Any ideas, please?
>

Please trim down to a small testcase and submit a bug report. If your model
is well-behaving the view can't cache the option that way. You would have
crashes even if you use entirely public APIs (such as QString::fromRawData)
and that's unacceptable.

HTH,
-- 
Giuseppe D'Angelo
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Deploy Qt on windows with relative paths

2016-01-19 Thread Denis Shienkov
Hi all.

I want to launch my QML application, based on Qt 5.x, QtQuick 2 with
following deployment tree:

deploy
  |-> deploy-qt-runtime
  |-> deploy-my-app

where

1) "deploy-qt-runtime" directory contains all required stuff, which is got
by means of 'windeployqt.exe' (where I pass the --qmldir to my QML source
files of application).

2) "deploy-my-app" contains my executable file

I want to launch my application from the "deploy-my-app" directory by means
of
console. But it does nothing, and I got following error from console:

"module "QtQuick" is not installed"

it is strange, because I use QtQuick 2.0!

I tried dofferent ways to launch my application:

1) Using qt.conf file

[Paths]
plugins = ../deploy-qt-runtime
imports = ../deploy-qt-runtime
bin = ../deploy-qt-runtime
libexec = ../deploy-qt-runtime
qml = ../deploy-qt-runtime
translations = ../deploy-qt-runtime/translations

2) Using env variables:

set QT_RUNTIME_DR=..\deploy-qt-runtime
set QT_PLUGIN_PATH=%QT_RUNTIME_DR%
set PATH=%QT_RUNTIME_DR%;%PATH%

start my-app.exe

but it is unsuccessfully!

BUT: when I copy my executable file into "deploy-qt-runtime" directory,
all works fine!!!

Note: I do not want mixing my aplication with qt-runtime resources.

So, is it possible to launch application with this "relative" way?

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


Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?

2016-01-19 Thread Elvis Stansvik
2016-01-17 15:46 GMT+01:00 John Layt :
>
>
> On 17 January 2016 at 14:30, Elvis Stansvik  wrote:
>>
>> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik :
>> > Hi all,
>> >
>> > In an effort to cut down on the size of the standalone ZIP
>> > distribution of my small command line tool [1] which only uses QtCore,
>> > and which to my knowledge does not depend on any localization
>> > features, I'd like to try replacing the icudtXX.dll that I currently
>> > take from the Qt bin directory with a custom one built using the ICU
>> > Data Library Customizer [2].
>>
>> I've slightly misunderstood how the ICU Data Library Customizer works.
>> I thought it would generate a icudtXX.dll, but it generates a .dat
>> file to be used in the compilation of ICU.
>>
>> So now that I know that I have to re-build ICU with this .dat file, my
>> question are:
>>
>> 1. Is it safe to replace the three icu.dll DLL files without also
>> re-building Qt, provided that I use the exact same ICU version,
>> compiled with the exact same compilation flags, but with a different
>> .dat file?
>>
>> 2. If so, which parts of the .dat file can I safely exclude with the
>> ICU Data Library Customizer? I don't think I need any of the features
>> which Qt uses ICU for, but are there some parts that must be included
>> for Qt to function at all?
>>
>> 3. Where can I find out how the ICU bundled with official Qt builds was
>> built?
>
>
> Advice for compiling ICU can be found at
> https://wiki.qt.io/Compiling-ICU-with-MSVC, you don't need to worry about
> compatibility so much as ICU offers no binary compatibility guarantees so Qt
> only uses the C interface.
>
> Frankly though, ICU is a pain to build and if you're rebuilding anything I'd
> suggest you just rebuild Qt instead with the no ICU flag set. The only thing
> you loose on Windows are proper collation support for Win XP, proper
> toUpper/toLower support in tricky languages, and various Unicode look-up
> tables. If you're not worried about those then this is a better path for
> you.

Hi again John,

I'm now in the process of setting up a separate Git repo with an
appveyor.yml file such that it'll build minimal ICU DLLs for me.
Mostly because I wanted to see how easy/hard it'd be. It seems to work
out well so far, just a few kinks to work out.

However, I'm still wondering if there's some definitive place where I
can see which exact version of ICU was used for the official builds.
Perhaps you know where this would be?

I know I can look at the file names of installed DLLs (e.g.
icudt54.dll would indicate ICU 54.x was used), but I'd rather be
double sure and see the scripts used to build the ICU that official Qt
uses.

Elvis

>
> John.
>
>
> ___
> 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] Deploy Qt on windows with relative paths

2016-01-19 Thread Igor Mironchik

On Windows you can try to set up working directory in the shortcut...

On 19.01.2016 20:56, Denis Shienkov wrote:

Hi all.

I want to launch my QML application, based on Qt 5.x, QtQuick 2 with
following deployment tree:

deploy
  |-> deploy-qt-runtime
  |-> deploy-my-app

where

1) "deploy-qt-runtime" directory contains all required stuff, which is got
by means of 'windeployqt.exe' (where I pass the --qmldir to my QML 
source files of application).


2) "deploy-my-app" contains my executable file

I want to launch my application from the "deploy-my-app" directory by 
means of

console. But it does nothing, and I got following error from console:

"module "QtQuick" is not installed"

it is strange, because I use QtQuick 2.0!

I tried dofferent ways to launch my application:

1) Using qt.conf file

[Paths]
plugins = ../deploy-qt-runtime
imports = ../deploy-qt-runtime
bin = ../deploy-qt-runtime
libexec = ../deploy-qt-runtime
qml = ../deploy-qt-runtime
translations = ../deploy-qt-runtime/translations

2) Using env variables:

set QT_RUNTIME_DR=..\deploy-qt-runtime
set QT_PLUGIN_PATH=%QT_RUNTIME_DR%
set PATH=%QT_RUNTIME_DR%;%PATH%

start my-app.exe

but it is unsuccessfully!

BUT: when I copy my executable file into "deploy-qt-runtime" directory,
all works fine!!!

Note: I do not want mixing my aplication with qt-runtime resources.

So, is it possible to launch application with this "relative" way?

BR,
Denis













___
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] Reorder QTableView rows via drag and drop

2016-01-19 Thread Murphy, Sean
I’ve got a QTableView that I’d like to be able to reorder the rows via drag n 
drop. So reading up on how to do it I stumbled across 
void QHeaderView::setSectionsMovable(bool movable)
which allows the user to grab the header section, reorder the rows in the view, 
and then I can grab this signal
void QHeaderView::sectionMoved(int logicalIndex, int oldVisualIndex, int 
newVisualIndex)
to update my data model accordingly. So I whipped up a little test app, and it 
almost does what I want, except for a couple things:
- in the real application we aren't using a vertical header. I could probably 
change what I'm doing right now to replace what is currently my first column of 
data and put that information on the vertical header instead
- using the header view only allows the user to begin the drag on the header 
section. Ideally, I'd like the user to be able to start the drag anywhere on 
the entire row, not just the header (if I even choose to have a header)

As I've kept poking around, it looks like to do what I want I need to override 
a bunch of functions in the model class (supportedDropActions(), 
dropMimeData(), flags(), etc.) as well as enable a handful of drag and drop 
settings on the table view itself. So it goes from a one-liner doing it through 
the header class, to a lot more code in the view & model class. It doesn't look 
too hard to do, but before I go down that path, I just wanted to make sure I'm 
not missing something easier?

So the basic requirements:
- table view selects entire rows 
(ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows))
- user should be able to reorder rows by starting a drag anywhere on a given row
- dropping the item reorders the rows, and provides me a signal of that action 
so I can update the underlying data. My application presents the underlying 
data in a couple different spots/ways, and we want to ensure that all spots are 
always in the same order. So if the user changes the order in this table, I 
need to update the other displays as well so I just need to know when this 
event happens
- I'd love for there to be a nice visually indicator of where the drop is going 
to happen. As I was playing around with overriding the model drag and drop 
stuff, the default action appeared to highlight the a cell where the drop was 
going to happen, which looked a little weird as I was dragging an entire row, 
but the drop indicator was the border around a single cell
- all drag and drops are internal to the table, I don't need to support 
dropping anything external onto the table

Sean




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


[Interest] QVariant conversion (QString->QChar)

2016-01-19 Thread Ch'Gans
Hi there,

According to the documentation of "bool QVariant::canConvert(int
targetTypeId) const" [1] a QVariant holding a QString should be able
to convert to QChar as "QMetaType::QString converts automatically to
QMetaType::QChar"

but the following code:
QVariant from = QVariant::fromValue(QString("a"));
QVariant to = from;
bool success = to.convert(QMetaType::QChar);
qDebug() << from << success << to;
yields:
QVariant(QString, "a") false QVariant(Invalid)

and this code:
QVariant from = QVariant::fromValue(QString("1"));
QVariant to = from;
bool success = to.convert(QMetaType::Int);
qDebug() << from << success << to;
yields:
QVariant(QString, "1") true QVariant(int, 1)

Is the documentation correct or is it me missing something trivial?

Thanks,
Chris

[1] http://doc.qt.io/qt-5/qvariant.html#canConvert
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Deploy Qt on windows with relative paths

2016-01-19 Thread alexander golks
hi,

or simply put "deploy-qt-runtime" to the path for current console session,
or create a batch setting the path and starting the app.

alex

> On Windows you can try to set up working directory in the shortcut...
> 
> On 19.01.2016 20:56, Denis Shienkov wrote:
> > Hi all.
> >
> > I want to launch my QML application, based on Qt 5.x, QtQuick 2 with
> > following deployment tree:
> >
> > deploy
> >   |-> deploy-qt-runtime
> >   |-> deploy-my-app
> >
> > where
> >
> > 1) "deploy-qt-runtime" directory contains all required stuff, which is got
> > by means of 'windeployqt.exe' (where I pass the --qmldir to my QML 
> > source files of application).
> >
> > 2) "deploy-my-app" contains my executable file
> >
> > I want to launch my application from the "deploy-my-app" directory by 
> > means of
> > console. But it does nothing, and I got following error from console:
> >
> > "module "QtQuick" is not installed"
> >
> > it is strange, because I use QtQuick 2.0!
> >
> > I tried dofferent ways to launch my application:
> >
> > 1) Using qt.conf file
> >
> > [Paths]
> > plugins = ../deploy-qt-runtime
> > imports = ../deploy-qt-runtime
> > bin = ../deploy-qt-runtime
> > libexec = ../deploy-qt-runtime
> > qml = ../deploy-qt-runtime
> > translations = ../deploy-qt-runtime/translations
> >
> > 2) Using env variables:
> >
> > set QT_RUNTIME_DR=..\deploy-qt-runtime
> > set QT_PLUGIN_PATH=%QT_RUNTIME_DR%
> > set PATH=%QT_RUNTIME_DR%;%PATH%
> >
> > start my-app.exe
> >
> > but it is unsuccessfully!
> >
> > BUT: when I copy my executable file into "deploy-qt-runtime" directory,
> > all works fine!!!
> >
> > Note: I do not want mixing my aplication with qt-runtime resources.
> >
> > So, is it possible to launch application with this "relative" way?
> >
> > BR,
> > Denis
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 


-- 
/*
 *Clothes make the man.  Naked people have little or no influence on society.
 *-- Mark Twain
 */


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


Re: [Interest] Add margin spacing between QComboBox item icon and text ?

2016-01-19 Thread Rainer Wiesenfarth
From: Bo Thorsen
> Den 18-01-2016 kl. 19:36 skrev Edward Sutton:
> > When the QComboBox drop-down is activated, the icons overlay the text 
> > making it hard to read.
> >
> > Is there a property or style sheet to adjust this?
> >
> > For the currently selected its, the icon and text have good spacing 
> > QComboBox.
> >
> > Item icon overlays text.
> 
> I don't know what you did, but that's not how it normally looks. 
> Obviously not.

We experience a similar behavior with Qt 5.3.2 on Linux, but only when using 
style sheets. There seems to be no option to get rid of the tick mark. See 
attached screenshot...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML Video cannot open remote url on Android ?!?!?

2016-01-19 Thread Gian Maxera
Hello,
is it possible that on Android devices the Video QML item does not support 
source with https protocol ??
On iOS it works perfectly, while on Android I get this error:

 D/MediaPlayer( 8516): java.io.FileNotFoundException: No content provider: 
https://afdc1d5f7fc181fca110-0b1385a62d762ade5ff0a8631476a6a0.ssl.cf3.rackcdn.com/render.mp4

Why ??

Ciao,
Gianluca.

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


[Interest] Build a Photos(Mac) copy with Qt Widgets

2016-01-19 Thread Hualet Wang
Hi friends.

I’m trying to build a Photos like application with Qt Widgets. The main view 
should be able to display the photos, delete items on demand. I’m not sure if 
QTableView is sufficient to accomplish the task. Any ideas or any suggested 
project that I can refer to ?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QtAndroidMediaPlayer not playing remote HTTP files

2016-01-19 Thread Gian Maxera
Hello,
I’ve just opened a bugs on QtAndroidMediaPlayer … I hope it's just me doing 
something wrong :-)
https://bugreports.qt.io/browse/QTBUG-50539 


Ciao,
Gianluca.

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


Re: [Interest] Build a Photos(Mac) copy with Qt Widgets

2016-01-19 Thread Igor Mironchik

Hello,

On 19.01.2016 17:47, Hualet Wang wrote:

Hi friends.

I’m trying to build a Photos like application with Qt Widgets. The main view 
should be able to display the photos, delete items on demand. I’m not sure if 
QTableView is sufficient to accomplish the task. Any ideas or any suggested 
project that I can refer to ?


You can do this with QtMWidgets, specifically with AbstractListView.

For example look at this screen-shot:

https://imironchik.blogspot.com/2015/01/qtmwidgetsabstractlistview.html

QtMWidgets you can find here:

https://github.com/igormironchik/qtmwidgets

As I understood you need some kind of table, at this time table is not 
implemented in QtMWidgets, but you can do stuff with list where row will 
display more than one image.


If you are interested I can implement AbstractTableView like 
AbstractListView, I don't think that will take much time from me...

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


Re: [Interest] Build a Photos(Mac) copy with Qt Widgets

2016-01-19 Thread Igor Mironchik



On 19.01.2016 17:47, Hualet Wang wrote:

Hi friends.

I’m trying to build a Photos like application with Qt Widgets. The main view 
should be able to display the photos, delete items on demand. I’m not sure if 
QTableView is sufficient to accomplish the task. Any ideas or any suggested 
project that I can refer to ?


And one more, what about QTableWidget with icons? And why you decided 
that QTableView will not do the trick? I don't have Mac, so I don't know 
what are you talking about exactly...


And QtMWidgets is for touch-devices...


___
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 5.6.0 beta / Mac / lldb / Debug Symbols

2016-01-19 Thread Thiago Macieira
On Tuesday 19 January 2016 10:34:27 Nils Jeisecke via Interest wrote:
> Hi list,
> 
> On Thu, Jan 14, 2016 at 1:45 PM, myself wrote:
> > However I don't get lldb to display line numbers or show source code for
> > stack frames inside Qt.
> Seems that there is no such problem when using the debug version of a
> self-compiled Qt library.
> 
> Is this an issue with the official release (5.6 beta Mac)?

Yes. Debug symbols in the pre-compiled builds do not work.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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