Comments (3)
So, the first argument is a name for variable to use in the loop and the second is a list. So it can be rewritten as
QList<QSlider*> list = findChildren<QSlider*>();
for (int i = 0; i < list.size(); i++) {
list[i]
}
from examples.
This is c++11
standard. Qt 5.7 and later will require it by default. I think Visual Studio 2012 may be required.
Or, you can always rewrite the loop in older syntax.
from examples.
Tadej,
Thank you for pointing this out. It looks like I need to learn more about C++11. In the mean time I am stuck with the Visual Studio 2010 compiler. Could you tell me what that line would look like using the older syntax like for(x=0; x <MAX; x++)
The statement below is more complex than my simple example above.
for (QSlider *slider : findChildren<QSlider*>()) {
Your response will help me understand how the newer range based loops work.
Thank You,
Joe Hellesen
From: Tadej Novak [mailto:[email protected]]
Sent: Monday, May 9, 2016 1:10 AM
To: vlc-qt/examples [email protected]
Cc: joehellesen [email protected]; Author [email protected]
Subject: Re: [vlc-qt/examples] Cannot compile vlc-qt example - syntax error (#4)
This is c++11 standard. Qt 5.7 and later will require it by default. I think Visual Studio 2012 may be required.
Or, you can always rewrite the loop in older syntax.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #4 (comment) https://github.com/notifications/beacon/ASXOkpEz_QInVSVWSaS-qpACZhp1zXbCks5p_s_DgaJpZM4IZvSp.gif
from examples.
Related Issues (20)
- how to build and run qml-player HOT 1
- How to add network caching to qml-player
- Google Drive link broken
- How to use VLC effects, transformations and rotations in this sample-player?
- VLCQtCore/Common.h: No such file or directory
- Segmentation fault with VLC QT qml player
- .dlls missing when runnig .exe HOT 1
- build simple player on windows HOT 1
- i get qt::quick not installed error eventhough it does exist
- Example RTSP playback delay of 1 second or so
- "QWidget: Must construct a QApplication before a QWidget" when using VlcWidgetVideo class
- File format not recognized (crt2.o)
- Crash while running simple-player.exe
- use qml to play local file error
- how to get the media width and height HOT 1
- QML module not found (VLCQt) in Qt_5_12_2_MSVC2015_64bit Windows 10 and VlcQmlVideoPlayer is deprecated HOT 1
- When using the example on the Macos, the video is not full of widgets, and you need to stretch the window to return to normal HOT 1
- cant see VlcWidgetVideo HOT 1
- Simple Player Segmentation Fault while creating VlcInstance() HOT 2
- QWidget: Must construct a QApplication before a QWidget #197 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.