Read detais: http://blog.qt.digia.com/blog/2013/01/31/qt-5-0-1-released/
Thursday, January 31, 2013
Saturday, January 5, 2013
Add control on Qt GUI and assign Signal/Slot graphically.
Last post describe how to new a empty Qt Gui Application. Base on the generated project, we are going to add a button graphically.
- Double click to open mainwindow.ui under Forms of our project in the Projects box. With .ui file selected, we can switch between (text) Edit View and (graphically) Design view, by click on the Edit/Design button on the left side bar.
- With Design View opened and make sure the Edit Widgets (F3) button is pressed, we can drag any widget from the left selection box to the design pane. Lets drag to add a Push Button. And double click on the text over it to edit text property to "Hello Qt".
Now, we can assign SIGNAL and SLOT to the Push Button to close the Window.
- Click on the Edit Signals/Slots (F4) button.
- Press and hold mouse left button over the Push Button, and pull a line out to any space, and release mouse button.
- Select clicked() in pushButton(QPushButton) box.
- Check to enable Show signals and slots inherited from QWidget.
- Select close() in MainWindow(QMainWindow).
- Click OK.
Now your Design view will become:
Finally Run your application. Now you can click the Push Button to close the Window.
- Double click to open mainwindow.ui under Forms of our project in the Projects box. With .ui file selected, we can switch between (text) Edit View and (graphically) Design view, by click on the Edit/Design button on the left side bar.
- With Design View opened and make sure the Edit Widgets (F3) button is pressed, we can drag any widget from the left selection box to the design pane. Lets drag to add a Push Button. And double click on the text over it to edit text property to "Hello Qt".
Now, we can assign SIGNAL and SLOT to the Push Button to close the Window.
- Click on the Edit Signals/Slots (F4) button.
- Press and hold mouse left button over the Push Button, and pull a line out to any space, and release mouse button.
- Select clicked() in pushButton(QPushButton) box.
- Check to enable Show signals and slots inherited from QWidget.
- Select close() in MainWindow(QMainWindow).
- Click OK.
Now your Design view will become:
Finally Run your application. Now you can click the Push Button to close the Window.
Create Gui application on Qt 5
- In Qt Creator, click File -> New File or project... to create our new project. Select Projects of Applications, Qt Gui Application and click Choose...
- Enter Name and Browse... to select the location to create your project, Next>
- Accept the default setting of Kit Selection, Class Information and Project Management.
- Qt Creator will create pre-set Qt Gui project for you.
Now you can click Build->Run, or Ctrl R, or click the green arrow button to run the dummy application.
- Next: Add control on Qt GUI and assign Signal/Slot graphically.
- Enter Name and Browse... to select the location to create your project, Next>
- Accept the default setting of Kit Selection, Class Information and Project Management.
- Qt Creator will create pre-set Qt Gui project for you.
Now you can click Build->Run, or Ctrl R, or click the green arrow button to run the dummy application.
- Next: Add control on Qt GUI and assign Signal/Slot graphically.
Install Qt 5.0.0 on fresh new Ubuntu 12.10
After install Qt 5.0.0 on fresh new Ubuntu 12.10, you will be complained with error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.
You have to install g++ on Ubuntu, enter the command in Terminal:
$sudo apt-get install g++
You will face with another error: cannot find -lGL.
To solve it, install OpenGL library. Enter the command in Terminal:
$sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
You have to install g++ on Ubuntu, enter the command in Terminal:
$sudo apt-get install g++
You will face with another error: cannot find -lGL.
To solve it, install OpenGL library. Enter the command in Terminal:
$sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
Install Qt 5.0.0 on fresh new Ubuntu 12.10 |
Friday, January 4, 2013
cannot find -lGL
I have just installed Qt 5 on Ubuntu, and tried my first Hello World. But fail in Build with error of "cannot find -lGL"!
It's OpenGL API missed.
To install OpenGL library, you can install libgl1-mesa-dev and libglu1-mesa-dev using Ubuntu's Package Manager, and also the other required packages.
Open Synaptic Package Manager, search and install libgl1-mesa-dev and libglu1-mesa-dev, and accept install the required packages.
After installed, re-build my Qt project, and OK DONE.
It's OpenGL API missed.
To install OpenGL library, you can install libgl1-mesa-dev and libglu1-mesa-dev using Ubuntu's Package Manager, and also the other required packages.
Open Synaptic Package Manager, search and install libgl1-mesa-dev and libglu1-mesa-dev, and accept install the required packages.
After installed, re-build my Qt project, and OK DONE.
Subscribe to:
Posts (Atom)
Labels
Dev. tools
(13)
how to
(10)
Internet of Things (IoT)
(1)
learn Qt
(1)
misc
(1)
misc.
(1)
mobile
(2)
news
(6)
OpenCV
(1)
OpenGL
(1)
QML
(1)
qml example
(40)
Qt
(2)
Qt Cloud
(1)
Qt Creator
(3)
Qt Creator Examples
(4)
Qt Enterprise Embedded
(1)
Qt Examples
(1)
Qt for Android
(5)
Qt for iOS
(2)
Qt for MCU
(1)
Qt news
(1)
Qt Quick
(3)
Qt Quick Control
(1)
Qt Quick Designer
(2)
QtQuick example
(14)
QtQuick.Controls examples
(13)
Ubuntu SDK
(1)
VirtualBox
(1)
WebEngine
(1)