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. 'class Ui::MainWindow' has no member named 'stackedWidgetDigio'
Forum Updated to NodeBB v4.3 + New Features

'class Ui::MainWindow' has no member named 'stackedWidgetDigio'

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 10.0k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    itsmemax
    wrote on last edited by
    #1

    Well, I really don't know why this gives me the above error:

    @void MainWindow::on_comboBox_currentTextChanged(const QString &arg1)
    {
    if (arg1 == "SysConfig")
    ui->stackedWidgetDigio->currentIndex == 1;
    else if(arg1 == "Digital I/O")
    ui->stackedWidgetDigio->currentIndex == 0;
    }@

    And yea, I've got a StackedWidget called stackedWidgetDigio of course.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Rebuild your project (clean, run qmake, rebuild).

      Also, are you aware that the code you wrote does not do a thing, and is actually invalid? If you want to change the index, use setCurrentIndex() method. If you want to read, don't use equality check (==).

      (Z(:^

      1 Reply Last reply
      1
      • I Offline
        I Offline
        itsmemax
        wrote on last edited by
        #3

        Okay, thanks.

        And yea, I forgot about that. I've coded for 1 year now in VB.NET and now came back to Qt, kinda hard to switch again.

        /e: No effect. I noticed, that he does not know the widget in ui_mainwindow.h - he does not write it into this file. He simply doesn't write any new widgets in there.

        /e2: My whole UI compiler's broken. I created a new project as a test, and somehow all the stuff which I created in the designer for my normal project is now in the ui_mainwindow.h of the new test project. It's all fucked up. I'm updating Qt now in hope that I won't have to redesign everything.

        /e3: Had to do a full uninstall of all Qt versions, clean the regedit of everything Qt and MinGW related etc. - then reinstalling Qt. Works again.

        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