Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Forms not refreshing on tabs

Forms not refreshing on tabs

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 3 Posters 3.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.
  • A Offline
    A Offline
    alfah
    wrote on last edited by
    #1

    hi

    The forms dont seem to be refreshing when i switch tabs,
    obj.repaint() should repaint the form with all widgets right??

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      is the form you want to repaint in the QTabWidget or is it modal?

      If you want some action to be triggered when you change to another tab on a QTabWidget you can use signal slots.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • EddyE Offline
        EddyE Offline
        Eddy
        wrote on last edited by
        #3

        have a look at "this thread.":http://developer.qt.nokia.com/forums/viewthread/8492/
        ;)

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alfah
          wrote on last edited by
          #4

          hey eddy,

          I know its a late response, weekend you know :)

          yeaa the problem is similar, the values are saved but it wont be displayed unless you exit and start application. So that means the form jus needs refreshing.
          Wat does repaint exactly do???

          alfah

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alfah
            wrote on last edited by
            #5

            hello everybody

            Im trying to display 3 forms(calender, history, statistics) which has 3 classes into a MainWindow Class which has three tabs created using the designer. When the application runs for the first time, it displays the history form into the tab. But when it is being run the second time, the form is displayed over the tabs that the tabs are not visible. :(

            @

            MainWindow::MainWindow(QWidget *parent) :
            QMainWindow(parent),
            ui(new Ui::MainWindow)
            {

            ui->setupUi(this);
            
            CalenderForm *pCal = new CalenderForm();
            lay = new QVBoxLayout(ui->tab);
            lay->addWidget(pCal);
            connect(ui->tabWidget,SIGNAL(currentChanged(int)),this,SLOT(a(int)));
            

            }

            void MainWindow::a(int index)
            {
            switch(index)
            {
            case 0:
            callCal();
            break;

              case 1:
                callHist();
                break;
            
            default:
                break;
            }
            

            }

            void MainWindow::callHist()
            {
            
                HistoryForm *pHis = new HistoryForm();
                pHis->DisplayHistory();
                pHis->show();
                lay2 = new QVBoxLayout(ui->tab_2);
                lay2->addWidget(pHis);
            }
            

            @

            alfah

            Eddy : EDIT please don't start new topics for the same problem.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alfah
              wrote on last edited by
              #6

              ahh k sorry

              1 Reply Last reply
              0
              • V Offline
                V Offline
                VitorAMJ
                wrote on last edited by
                #7

                Have you solved your problem? If yes, mark the topic as [SOLVED] ;-), otherwise I suggest that you explain a little better what do you want, I still could not get the problem/goal completely.

                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