Project

General

Profile

Actions

Bug #2002

closed

WTabWidget.setTabEnabled is partialy working

Added by Anonymous over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/27/2013
Due date:
% Done:

0%

Estimated time:

Description

Hi there,

just found that when you disable a tab with "setTabEnabled" the tab actually become grey but is always accessible (you can switch to).

Hope it will help !

Kim

Actions #1

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Korneel Dumon
  • Target version set to 3.3.1

This should work according to WMenuItem.C:453. Can we reproduce this and figure out what's wrong?

Actions #2

Updated by Korneel Dumon over 11 years ago

I tried it and it's working for me. Can you post a small piece of code that reproduces the problem?

Actions #3

Updated by Kim Forest over 11 years ago

//declaration

tabZones = new WTabWidget(table->elementAt(14,0));

// i add 8 of these. tZone1 is a WTemplate object

tabZones->addTab(tZone1,"Zone 1", WTabWidget::PreLoading);

//Where used.

void on_cmbIdProduit_changed()

{

int product_channel[19] = {8,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,8,8};

int index = cmbIdProduit->currentIndex();

for(int i=0; i < tabZones->count() ;i)

{

//Vérifier si l'indice courant est plus petite que le nombre de zone permise par le produit sélectionné

if(i < product_channel[index])

{

//tabZones->setTabHidden(i, false); //Montre l'onglet

tabZones->setTabEnabled(i,true);

}

else

{

// tabZones->setTabHidden(i, true); //Cache l'onglet

tabZones->setTabEnabled(i,false);

}

}

tabZones->setCurrentIndex(0); //Sélectionne l'onglet zéro

}

please note that i've cloned the git directory 3 weeks ago.

Actions #4

Updated by Korneel Dumon over 11 years ago

  • Status changed from InProgress to Resolved

Thanks, I found the problem!

Actions #5

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF