[Interest] How to get number of channels from QAudioDeviceInfo

2016-01-21 Thread Glenn Ramsey
Hi,

I would like to use the Qt5.x QtMultiMedia to output sound independently on
multi-channel devices such as 5.1 and 7.1 sound cards. However I can't figure
out to tell how many channels a device has.

>From the documentation I guess that QAudioDeviceInfo::supportedChannelCounts is
the call that I need but that isn't giving the answers that I expect.

PyQt5 test program (built with Qt 5.5.1 on OSX 10.10.5):

from PyQt5.QtMultimedia import QAudioDeviceInfo, QAudio, QAudioFormat

for d in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
print d.deviceName(), d.supportedChannelCounts()
f = QAudioFormat(d.preferredFormat())
f.setChannelCount(6)
print d.isFormatSupported(f)

Using OSX 10.10.5 on a MacBook Pro I have a 5.1 USB audio card plugged in and
the output from the above program is:

Built-in Output [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
True
USB Audio [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
True

I was expecting some information that would tell me that the built in output has
2 channels and that 6 isn't supported and the USB audio has 6 channels. I get I
similar result on Windows 7.

What is the right way to query the number of channels on a device?

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


[Interest] QTableView - auto check item when row is selected

2016-01-21 Thread Frank Rueter | OHUfx

Sending again as it didn't seem to hit the list the first time:

Hi all,

I'm writing a simple table view to display a selection of files 
available in a repository for the user to select for download.

Using the model/view approach I have set the item to isCheckable(True).
The one tweak in behaviour I am trying to introduce is that I'd like the 
checkboxes to auto-adjust according to the respective rows selection 
state, so that the user can drag over a bunch of rows to check the 
boxes, rather than having to click multiple times.
So I implemented the view's selectionChanged() virtual function to drive 
the checkboxes for the selected/deselected items.


This works perfectly fine, the only hiccup I'm seeing is that when 
clicking on an unchecked checkbox directly, it won't be checked the 
first time, only  the second time, when the respective row is selected 
as well, will the click cause the checkbox to be checked.

Interestingly, the culprit seems to be this block in selectionChanged():
for i in selected.indexes():
# this causes checkboxes to not be checked unless the 
respective row is selected

item = self.model().itemFromIndex(i)
item.setCheckState(Qt.Checked)


I also tried adding this to no avail:
super(FileChoserView, self).selectionChanged(selected, deselected)


How can I fix this little glitch? Or should I be doing this in an 
entirely different way?

Below is the entire test code (raw and in pastebin link).

Thanks in advance for any advise,
frank




http://pastebin.com/T3tSgWRr


from PySide.QtGui import *
from PySide.QtCore import *


class FileModel(QStandardItemModel):

def __init__(self, toolData, parent=None):
super(FileModel, self).__init__(parent)
self.containers = []
self.headerLabels = ['file name']
self.dataDict = toolData
self.setUp()

def setUp(self):
'''fill model with data'''

self.clear()
for row, file_ in enumerate(self.dataDict['files']):
fileItem = QStandardItem(file_['filename'])
fileItem.setCheckable(True)
font = QApplication.font()
font.setPointSize(10)
fileItem.setFont(font)
self.setItem(row, 0, fileItem)

self.setHorizontalHeaderLabels(self.headerLabels)


class FileChoserView(QTableView):

def __init__(self, parent=None):
super(FileChoserView, self).__init__(parent)
self.setSortingEnabled(True)
self.setEditTriggers(QAbstractItemView.NoEditTriggers)
self.horizontalHeader().setStretchLastSection(True)
self.setSelectionBehavior(QAbstractItemView.SelectRows)
self.setContextMenuPolicy(Qt.ActionsContextMenu)
horizontalHeader = self.horizontalHeader()
self.verticalHeader().hide()

def selectionChanged(self, selected, deselected):
'''Check item when row is selected'''

for i in selected.indexes():
# this causes checkboxes to not be checked unless the 
respective row is selected

self.model().itemFromIndex(i).setCheckState(Qt.Checked)

for i in deselected.indexes():
self.model().itemFromIndex(i).setCheckState(Qt.Unchecked)


if __name__ == '__main__':
import sys
app = QApplication([])
testData = {'files':[dict(filename='file_{}.zip'.format(i)) for i 
in xrange(10)]}


w = FileChoserView()
model = FileModel(testData)
w.setModel(model)
w.show()
sys.exit(app.exec_())



--
ohufxLogo 50x50  	*vfx compositing 
 | *workflow customisation 
and consulting * *


___
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 Jason H
> Sent: Thursday, January 21, 2016 at 3:15 PM

> 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.
> 

You can of course do this, however, your platform must support it.  I'm mucking 
about in the multimedia stuff at the moment (not my usual thing), and I don't 
see an obvious reason why you can't implement your own multimedia plugin. You 
would have to write a frame source (i.e. a Camera). You can model it around one 
of the existing backends.

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


Re: [Interest] Can't login to bugreports

2016-01-21 Thread Jason H


> Sent: Thursday, January 21, 2016 at 1:42 PM
> From: "Matthew Woehlke" 
> To: interest@qt-project.org
> Subject: Re: [Interest] Can't login to bugreports
>
> On 2016-01-21 11:37, Thiago Macieira wrote:
> > On Thursday 21 January 2016 16:18:52 Jason H wrote:
> >> It seems the login now requires an @, and something is amiss in my account.
> >>
> >> Can someone look into it? The password reset link isn't working. I'm not
> >> sure which email domain it is going to, but none of them have received a
> >> password reset link.
> > 
> > This was announced several times. You need to log in with your Qt account 
> > (see 
> > http://account.qt.io). 
> 
> Jason, do you *have* a Qt account? I didn't. I had to create one using
> my Jira e-mail. Once I did that, I could log into Jira and see my old
> bug reports.


I guess that was it. I created an account with my bugreports email and it 
worked as described.
___
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


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

2016-01-21 Thread Phil Weinstein
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).

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


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

2016-01-21 Thread Phil Weinstein
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.

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


Re: [Interest] Can't login to bugreports

2016-01-21 Thread Matthew Woehlke
On 2016-01-21 11:37, Thiago Macieira wrote:
> On Thursday 21 January 2016 16:18:52 Jason H wrote:
>> It seems the login now requires an @, and something is amiss in my account.
>>
>> Can someone look into it? The password reset link isn't working. I'm not
>> sure which email domain it is going to, but none of them have received a
>> password reset link.
> 
> This was announced several times. You need to log in with your Qt account 
> (see 
> http://account.qt.io). 

Jason, do you *have* a Qt account? I didn't. I had to create one using
my Jira e-mail. Once I did that, I could log into Jira and see my old
bug reports.

-- 
Matthew

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


Re: [Interest] Can't login to bugreports

2016-01-21 Thread Jason H


> Sent: Thursday, January 21, 2016 at 11:37 AM
> From: "Thiago Macieira" 
> To: interest@qt-project.org
> Subject: Re: [Interest] Can't login to bugreports
>
> On Thursday 21 January 2016 16:18:52 Jason H wrote:
> > It seems the login now requires an @, and something is amiss in my account.
> > 
> > Can someone look into it? The password reset link isn't working. I'm not
> > sure which email domain it is going to, but none of them have received a
> > password reset link.
> 
> This was announced several times. You need to log in with your Qt account 
> (see 
> http://account.qt.io). 


Yes, I know. But I have no idea what my login info is anymore. The bug updates 
go to this address, which is new because Yahoo changed and broke mailing lists 
like 2 years ago, I've had a few commercial accounts. It's quite the mess. 
Also, I didn't receive the password reset email.

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


Re: [Interest] Can't login to bugreports

2016-01-21 Thread Thiago Macieira
On Thursday 21 January 2016 16:18:52 Jason H wrote:
> It seems the login now requires an @, and something is amiss in my account.
> 
> Can someone look into it? The password reset link isn't working. I'm not
> sure which email domain it is going to, but none of them have received a
> password reset link.

This was announced several times. You need to log in with your Qt account (see 
http://account.qt.io). 

-- 
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


[Interest] Can't login to bugreports

2016-01-21 Thread Jason H
It seems the login now requires an @, and something is amiss in my account.

Can someone look into it? The password reset link isn't working. I'm not sure 
which email domain it is going to, but none of them have received a password 
reset link.

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


Re: [Interest] Issue with QGLWidget inside QMdiArea

2016-01-21 Thread Thomas Robitaille
Hi Giuseppe,

Thank you for your quick reply - it looks like QOpenGLWidget was only
added in Qt5. I will try this to see if it helps, but in the mean
time, can you (or anyone else) suggest any possible workarounds that
might work with Qt4?

Thanks!
Tom


On 21 January 2016 at 12:31, Giuseppe D'Angelo  wrote:
> On Thu, Jan 21, 2016 at 1:25 PM, Thomas Robitaille
>  wrote:
>> This issue does NOT happen if I don't use a QMdiArea. Does anyone know
>> what might be causing this problem, and how to fix it? Is it a bug in
>> Qt?
>
> It is a consequence of QGLWidget creating a frameless top level window
> and trying to make it follow the MDI subwindows. Very little can be
> done about that. Can you try QOpenGLWidget instead?
>
> HTH,
> --
> Giuseppe D'Angelo
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Issue with QGLWidget inside QMdiArea

2016-01-21 Thread Giuseppe D'Angelo
On Thu, Jan 21, 2016 at 1:25 PM, Thomas Robitaille
 wrote:
> This issue does NOT happen if I don't use a QMdiArea. Does anyone know
> what might be causing this problem, and how to fix it? Is it a bug in
> Qt?

It is a consequence of QGLWidget creating a frameless top level window
and trying to make it follow the MDI subwindows. Very little can be
done about that. Can you try QOpenGLWidget instead?

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


[Interest] Issue with QGLWidget inside QMdiArea

2016-01-21 Thread Thomas Robitaille
Hi everyone,

I am trying to add a QGLWidget in an application I am working on.
However, I'm running into an issue which is that if I try and add the
QGLWidget to a QMdiArea, there is a very noticeable spatial lag
between where the Qt window is drawn and the OpenGL canvas when
dragging the MDI sub-window around. In fact, the Qt window seems to
drag behind the OpenGL canvas.

Here's a short screencast demonstrating this problem, slowed down by a
factor of 10:

https://www.youtube.com/watch?v=k7T7Sev91c8

The code I'm using to produce this is included below (in C++ with Qt4)
and can also be found here:

https://github.com/astrofrog/qt-build-sandbox/blob/master/opengl/opengl_mdi.cpp

This issue does NOT happen if I don't use a QMdiArea. Does anyone know
what might be causing this problem, and how to fix it? Is it a bug in
Qt?

Thanks in advance for any help!

Cheers,
Tom

---

#include 
#include 
#include 
#include 
#include 
#include 

class PlainGLWidget : public QGLWidget
{
protected:
virtual void paintGL();
};

void PlainGLWidget::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}


int main(int argc, char *argv[]) {

QApplication app(argc, argv);

QMainWindow *window = new QMainWindow;

QMdiArea *mdi = new QMdiArea;
window->setCentralWidget(mdi);

PlainGLWidget *viewer = new PlainGLWidget;
viewer->resize(600,600);

QMdiSubWindow *sub = new QMdiSubWindow;
sub->setWidget(viewer);
mdi->addSubWindow(sub);
sub->resize(600,600);

window->show();
window->raise();

return app.exec();

}
___
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-21 Thread Croitor Alexandr
Isn't the issue that the debug symbols are not shipped in the first place?
They usually reside in the object files, or are extracted into a dsym archive, 
and neither are shipped with the binary installation.

So placing the sources at the original compiled path won't really help.

> On 21 Jan 2016, at 00:39, Mike Jackson  wrote:
> 
>> 
>> On Jan 20, 2016, at 4:26 PM, Thiago Macieira  
>> wrote:
>> 
>> On Wednesday 20 January 2016 09:50:51 Nils Jeisecke via Interest wrote:
>>> On Tue, Jan 19, 2016 at 5:29 PM, Thiago Macieira
>>> 
>>>  wrote:
 Yes. Debug symbols in the pre-compiled builds do not work.
>>> 
>>> Is this a known issue or shall I create a bug report?
>> 
>> It's a known and, AFAIU, unfixable issue. That's just how the debug format 
>> stores the information.
>> 
>> I think it should show line numbers, but it can't find the source code 
>> because 
>> you don't have the source code at the same place as the debugging 
>> information 
>> expects it to be.
>> -- 
>> Thiago Macieira - thiago.macieira (AT) intel.com
>> Software Architect - Intel Open Source Technology Center
> 
> Not that I have tried this BUT in theory if you knew the exact paths that 
> Digia used to build the Qt distribution and set up your sources in the same 
> paths then the debug symbols might start working. At least that is the first 
> thing I would try.
> 
> —
> 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] Qt 5.6.0 beta / Mac / lldb / Debug Symbols

2016-01-21 Thread Nils Jeisecke via Interest
On Wed, Jan 20, 2016 at 10:26 PM, Thiago Macieira
 wrote:
> I think it should show line numbers, but it can't find the source code because
> you don't have the source code at the same place as the debugging information
> expects it to be.
No lines numbers shown here.

However what's the point in building and shipping the debug versions
as part of official releases when they are rather useless?

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