Skip to content

Latest commit

 

History

History
138 lines (102 loc) · 6.65 KB

README.md

File metadata and controls

138 lines (102 loc) · 6.65 KB

Qt.Widgets

shows how to use Qt widgets only by programming code (c++17).

qt

  • Application shows how to create an application with QApplication.
  • ApplicationAndException shows how to create an application with QApplication and how to manage exception.
  • DarkMode shows how to create a dark mode application.
  • AboutBox shows how to create an about box with QMessageBox.
  • ColorDialog shows how to create a color dialog with QColorDalog.
  • FolderBrowserDialog shows how to create a folder browser dialog with QFileDialog.
  • FontDialog shows how to create a font dialog with QFontDialog.
  • InputDialog shows how to create an input dialog with QInputDialog.
  • MessageBox shows how to create a message box with QMessageBox.
  • OpenFileDialog shows how to create an open file dialog with QFileDialog.
  • SaveFileDialog shows how to create an save file dialog with QFileDialog.
  • MainWindow shows how to create a window with QMainWindow.
  • MenuBar shows how to create a menu bar with QMenu and QAction.
  • StatusBar shows how to create a status bar with QStatusBar.
  • ToolBar shows how to create a toolbar bar with QToolsBar.
  • Frame shows how to create a frame with QFrame.
  • GroupBox shows how to create a group box with QGroupBox.
  • TabWidget shows how to create a tab widget with QTabWidget.
  • CheckBox shows how to create a check box with QCheckBox.
  • CheckedListWidget shows how to create a checked list widget with QListWidget.
  • ComboBox shows how to create a combo box with QComboBox.
  • Dial shows how to create a dial with QDial.
  • DoubleSpinBox shows how to create a double spin box with QDoubleSpinBox.
  • Label shows how to create a label with QLabel.
  • LCDNumber shows how to create a LCD number with QLCDNumber.
  • LineEdit shows how to create a line edit with QLineEdit.
  • ListView shows how to create a list view with QListView.
  • ListView2 shows how to create a list view with QTreeView.
  • ListWidget shows how to create a list widget with QListWidget.
  • PictureBox shows how to create a picture box with QLabel.
  • PictureBox2 shows how to create a picture box with QGraphicsPixmapItem.
  • ProgressBar shows how to create a ProgressBar with QProgress.
  • PushButton shows how to create a button and Event Click with QPushButton.
  • RadioButton shows how to create a radio button with QRadioButton.
  • Slider shows how to create a slider with QSlider.
  • SpinBox shows how to create a spin box with QSpinBox.
  • SpinButton shows how to create a spin button with QSpinBox.
  • ToggleButton shows how to create a toggle button with QPushButton.
  • TreeView shows how to create a three view with QTreeView.
  • TreeWidget shows how to create a three widget with QTreeWidget.
  • Widget shows how to create a widget with QWidget.
  • Cursors shows how to associate cursor to widget with QCursor.
  • Timer shows how to create a Timer with QTimer.
  • Line shows how to create a custom widget line with QFrame.
  • ButtonWithStyleSheet show how to use stylesheet with QPushButton.
  • InputDialogMultiline show how to use multiline input dialog with QInputDialog.
  • InputDialogPassword show how to use password input dialog with QInputDialog.
  • LCDNumber2 shows how to create a LCD number with QLCDNumber.
  • Wiggly shows how to animate a user control using QBasicTimer and timerEvent(). In addition, the example demonstrates how to use QFontMetrics to determine the size of text on screen.
  • WindowShowHide demonstrates the use of QMainWindow show, hide and close methods.

Generate and build

Qt Creator

To build these projects, open Qt.Widgets.pro file with Qt Creator.

CMake

To build this project, open "Terminal" and type following lines:

Set CMAKE_PREFIX_PATH with Qt6 install path.

Windows :

mkdir build
cd build
cmake ..
start ./Qt.Widgets.sln

macOS :

mkdir build
cd build
cmake .. -G "Xcode"
open ./Qt.Widgets.xcodeproj

Linux with Code::Blocks :

mkdir build
cd build
cmake .. -G "CodeBlocks - Unix Makefiles"
xdg-open ./Qt.Widgets.cbp > /dev/null 2>&1

Linux :

mkdir build
cd build
cmake .. 
cmake --build . --config Debug
./AnyProject