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. [Solved] Is NULL check needed for 'ui' in qt designer form class

[Solved] Is NULL check needed for 'ui' in qt designer form class

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 781 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.
  • A Offline
    A Offline
    Abin
    wrote on last edited by
    #1

    Hi,

    I know that null check is important to avoid any faults in application. But do I have to do null check for my widgets created in qt designer ??

    say...
    @SystemScreen::SystemScreen(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SystemScreen)
    {
    qDebug() << Q_FUNC_INFO << "Invoked";
    ui->setupUi(this);
    ui->tableNewButton->hide();@

    do I have to make a NULL check for all components when I use them?

    @if (NULL != ui->tableNewButton)
    {
    ui->tableNewButton->hide();
    }@

    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