Re: [Interest] Setting current item text color via stylesheet in QTableView for SelectRows

2018-08-10 Thread Patrick Stinson
Negative. “current” is not a valid pseudo state, as “focus” is the appropriate 
pseudo state for the current item.

> On Aug 9, 2018, at 6:15 PM, Reinhardt Behm  wrote:
> 
> Hi Patrick,
> 
> how about:
> QTableView::item:selected
> { color:green; }
> QTableView::item:current
> { color:yellow; }
> 
> -- 
> Best Regards
> 
> Reinhardt Behm
> 
> On Thursday 09 August 2018 10:34:38 you wrote:
>> Thanks again. Actually, what I am trying to do is differentiate between
>> current and selected items so that I can tell which item is current within
>> the selected row. For example, the following paints all selected items with
>> the same text color so you don’t know which one is selected:
>> 
>> QTableView::item:focus {
>>color: yellow;
>> }
>> 
>>> On Aug 7, 2018, at 11:31 PM, Reinhardt Behm  wrote:
>>> 
>>> Hi Patrick,
>>> 
>>> as I understood you, you want to style a row in a table view. When it is
>>> selected and and current.
>>> 
>>> I would do it like
>>> TableView::item:selected, TableView::item:current
>>> { color:ugly-green; }
>>> 
>>> This is untested.
>>> 
 Thanks again, but I still don’t think you have answered the question.
 
> On Aug 7, 2018, at 10:22 PM, Reinhardt Behm  > wrote:
> 
> You can combine attributes:
> 
> If needed, logical OR can be expressed using the comma operator:
> QCheckBox:hover, QCheckBox:checked { color: white }
> 
>> On Tuesday 07 August 2018 20:54:58 you wrote:
>> Thanks for your reply, Reinhardt. Your code acknowledges the selected
>> item
>> but I am looking for the current item whether it is selected or not.
>> 
>> -Patrick
>> 
>>> On Aug 7, 2018, at 6:00 PM, Reinhardt Behm via Interest
>>> mailto:interest@qt-project.org>> wrote:>
>>> 
>>> On Tuesday 07 August 2018 16:31:42 Patrick Stinson wrote:
 Hello!
 
 I have a vanilla QTableView with SingleSelection and SelectRows and
 am
 trying to figure out how to set the text color of the current item
 for
 both
 when the row is selected and when it isn’t. This is important so that
 the
 user knows which cell will be edited when they hit the enter key and
 so
 they can navigate to a new cell using the arrow keys.
 
 It seems that the following will do it, but it doesn’t apply when the
 row
 is selected.
 
 QTableView::item:focus {
 
 color: yellow;
 
 }
 
 How can this be done?
 
 Thanks!
 -Patrick
>>> 
>>> Here something is used in a similar case
>>> 
>>> TableViewBase {
>>> 
>>>  font-size: 18px; font-weight: bold;
>>>  background-color: white;
>>> 
>>> }
>>> TableViewBase::item {
>>> 
>>>  color: black;
>>>  font-size: 18px; font-weight: bold;
>>>  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:
>>>  0
>>> 
>>> #f6f7fa, stop: 1 #dadbde);
>>> }
>>> TableViewBase::item:selected {
>>> 
>>>  color: white;
>>>  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:
>>>  0
>>> 
>>> #606060, stop: 1 #00);
>>> }

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


Re: [Interest] windeployqt from win7 to win10

2018-08-10 Thread Furkan Üzümcü
If you are not deploying your app to Windows Store, the version that works for 
Windows 7 will work fine on Windows 10 as long as the required .dll files are 
copied along and the target machine is also x64. If you already ran windeployqt 
on the Windows 7 version of your app, you don’t even have to run it separately 
for Windows 10.

Regards,
Furkan Üzümcü
On Aug 10, 2018, 12:39 -0400, jagernico...@legtux.org, wrote:
>
> Hi,
> I built a project on win7 and I have to deploy this application on a win10 
> computer over internet. Is it possible to run windeployqt.exe for an 
> application built with msvc2017_64 and to ship all dlls for win10 ?
> otherwise, do I have to build the application on windows 10 ?
>
> regards,
> //nicoo
> ___
> 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] windeployqt from win7 to win10

2018-08-10 Thread jagernicolas
Hi,
I built a project on win7 and I have to deploy this application on a win10 
computer over internet. Is it possible to run windeployqt.exe for an 
application built with msvc2017_64 and to ship all dlls for win10 ?
otherwise, do I have to build the application on windows 10 ?

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


[Interest] Updating tooltips when model data changes

2018-08-10 Thread Álvaro Cebrián Juan
Hi all,

I have a QTableView tied to a QAbstractTableModel. I have enabled tooltips
in my model by handling Qt::TooltTipRole in the model's data() function.
The problem is that the tooltips are not updated when my model data
changes. I would like to update the active tooltip as soon as the model
data changes.

I noticed, however, that if I move the mouse within the cell, then the
tooltip gets updated. This doesn't happen if the mouse is still.

I would be grateful if somebody can shed some light on this.

Thank you.

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


Re: [Interest] get application's resources

2018-08-10 Thread Frank Rueter | OHUfx

Ah, nice one, thanks!
I also just stumbled over this which seems to work as well:

|QtCore.QResource(':qrc/images').children() |

Two arrows in the quiver now, sweet.

Thanks again,
frank


On 10/08/18 3:27 PM, Reinhardt Behm via Interest wrote:


QDir is your friend.

QDir dir(":/", "*");
qDebug() << dir.dirName() << dir.entryList();


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


Re: [Interest] Using C# with QML/QtQuick, introducing Qml.Net.

2018-08-10 Thread Jesus Fernandez
It looks really cool. Good work.


Best regards,

Jesús


From: Interest  on 
behalf of Paul Knopf 
Sent: Friday, August 10, 2018 7:48:58 AM
To: interest@qt-project.org
Subject: [Interest] Using C# with QML/QtQuick, introducing Qml.Net.

I have been hard at work on Qml.Net and I think it is at a point that I'd like 
to share it with you guys for your feedback.

https://github.com/pauldotknopf/Qml.Net

This project is similar to PyOtherSide, except for C#/.NET.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Swift?

2018-08-10 Thread Jason H
What is the status of using swift in Qt for Apple platforms? My recent effort 
of removing the status bar turned up a lot of swift code examples, it seems to 
be much more popular than Obj-C.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Swift?

2018-08-10 Thread Jason H
What is the status of using swift in Qt for Apple platforms? My recent effort 
of removing the status bar turned up a lot of swift code examples, it seems to 
be much more popular than Obj-C.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Swift?

2018-08-10 Thread Till Oliver Knoll


> Am 10.08.2018 um 15:08 schrieb Jason H :
> 
> What is the status of using swift in Qt for Apple platforms?

Last time I checked there was no such thing as „Swift++“ (in analogy to 
ObjC++), which makes it impossible to „mix and match“ Swift code with C++.

The common denominator is C, so you could write „C function wrappers for your 
C++ classes“ (and vice versa for your Swift classes).

Or still use ObjC++ to glue the C++ and Swift world.

In any case you‘re dealing with 3 distinct languages (where C is admittedly 
„kind of C++ without the ++).

Not sure what would be less pain: C („no objects/classes -> cumbersome wrapper 
API) or ObjC++ („from which you actually want to get away by using Swift“).

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


Re: [Interest] [Qt3D] Issues

2018-08-10 Thread Andy
On Thu, Aug 9, 2018 at 5:38 PM Oleg Evseev  wrote:

> Hi,
>
> I wonder why FirstPersonCameraController now in qt 5.11.1 by arrow up-down
> keys moves camera up and down instead of moving forward like in games (like
> first person view should), and as it is in 5.9.5?
>

The key bindings for the Qt3DExtras camera controllers are done in
QAbstractCameraController. There isn't a way to modify them through the
API. (e.g. See my previous email to the list about the escape key and this
bug report: https://bugreports.qt.io/browse/QTBUG-69802 )


> Also qgltf.exe of qt 5.11.1 for windows "Failed to import" (without any
> other error description) for the one of my model (for both obj and 3ds
> format). qgltf.exe of qt 5.9.5 handles this obj model without problems, but
> can't import 3ds model with "Qt3D.AssimpImporter: Assimp scene import
> failed Chunk is too large".
>

I think the assimp library version changed between Qt versions. You might
try its viewer to see if it's an assimp problem:

 https://github.com/assimp/assimp


> I like that qt 5.11.1 renders objects loaded in SceneLoader with
> phongmaterial with ambient color = "white" as should - it looks similar to
> Blender, while in qt 5.9.5 I need to reduce ambient by half or objects are
> overexposed to white instead of their diffuse color.
>
> But SceneLoader of  qt 5.11.1 still has texture rendering issues that was
> fixed in qt 5.8 (QTBUG-66644) once.
>
> I mean I can't choose version. It looks like qt 3d development still can
> not be stabilize :(
>

I agree that is very frustrating. What I find even more frustrating is the
complete lack of useful documentation for the Qt3D module and the broken
examples. It's really not up to the standard of the other parts of Qt I've
worked with. I really, really want to work with it, but it's not making it
easy (or enjoyable) :-)


> --
> With regards, Oleg.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTreeWidget displays blank widget

2018-08-10 Thread Nicolas Krieger
I have finally managed to do what I wanted in using styleSheets. Not 
really beautiful.




If a have a widget containing all other widgets, for which I defined a 
styleSheet, the color will be displayed only for the children (see last 
example).

The "solution" is to have a child widget that contains all other widgets.
In this example, a stylesheet is define for "widget_2". It is correctly 
displayed in the tree.






In this example, no stylesheet for "widget_2" and the palette's 
background color of "SimpleWidget" is blue.





In this example, there is no "widget_2" and a stylesheet is defined for 
"SimpleWidget".

Using the first example can be a solution.


Le 09/08/2018 à 18:13, Murphy, Sean a écrit :

Yes, I used QTreeWidget ::setCellWidget(int row, int column, QWidget *widget).
I have already used QStyledItemDelegate, but setCellWidget is far easiest for 
what I want to do.
I don't really understand why QPushbutton are correctly displayed and not other 
widgets.
But if only delegate is the solution, I will use it.

 From the discussion I had with support, it appears that QTableWidget is 
expecting a
QTableWidgetItem to define the colors for QPalette::ForegroundRole and 
QPalette::BackgroundRole,
but since you're using setCellWidget() you're most likely not adding a 
QTableWidgetItem to the
cell. Which even if you were, I don't think would get what you want since you 
have two different
background colors (the orange and the blue) as the background of the two 
labels. I don't know
if using QStyledItemDelegate gets you over that hurdle either, since I don't 
see how it allows you
to set different BackgroundRole values for the QLabel child widgets?

If you come up with a good solution, please respond to the list (or at least 
respond to me personally!)
as I'm interested in the correct solution to this as well just in case we 
decide to come back around to
this idea for our project.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


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


Re: [Interest] QTreeWidget displays blank widget

2018-08-10 Thread Tony Rietwyk

Hi Nicolas,

Try using a QFrame for SimpleWidget - you may be able to get rid of 
widget_2.


I'm surprised that the nested QWidget worked, as QWidget doesn't 
normally draw a background.


Hope that helps, Tony


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


Re: [Interest] QTreeWidget displays blank widget

2018-08-10 Thread Nicolas Krieger

I've tried with QFrame, and it does not work either.

I've tried with QStyledItemDelegate and only writing the "paint" method :
void

TestDelegate::paint(QPainter*painter,constQStyleOptionViewItem,constQModelIndex)const

{

SimpleWidget*pWidget=newSimpleWidget;

pWidget->render(painter);

}


But it is not satisfying.

Thank you for your help

Le 10/08/2018 à 12:47, Tony Rietwyk a écrit :

Hi Nicolas,

Try using a QFrame for SimpleWidget - you may be able to get rid of 
widget_2.


I'm surprised that the nested QWidget worked, as QWidget doesn't 
normally draw a background.


Hope that helps, Tony


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


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


Re: [Interest] QTreeWidget displays blank widget

2018-08-10 Thread coroberti .
Hi,
Try for your widgets to call

setAutoFillBackground(true);


Kind regards,
Robert


On Thu, Aug 9, 2018 at 5:58 PM, Nicolas Krieger
 wrote:
> Hello
>
> I would like to display colored widgets in a QTreeWidget.
>
> Screenshots of what I really have are in attached files.
>
> My wigdet is colored, but when in the QTreeWidget, it is all white. How can
> I resolve it?
>
> --
> Nicolas Krieger
>
> ___
> 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