Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtWidgets and QWidget
Forum Updated to NodeBB v4.3 + New Features

QtWidgets and QWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 872 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    ozzy
    wrote on last edited by
    #1

    What's the difference between #include<QtWidgets > and #include<QWidget>
    I search the qt document but i can't figure out.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Read here: http://doc.qt.io/qt-5/qtwidgets-index.html
      QtWidgets is a module containing all Qt widgets. QWidget is a widget class. You should not include whole modules, instead include only header files containing classes you really use. For example if you need QWidget then include QWidget, if you need QPushButton then include QPushButton.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved