Qt weird bug with QLabel (is it really fixed ?)

pull/13383/head
Yannick Verdie 15 years ago
parent e693f4b408
commit 3e8a8f7942
  1. 8
      modules/highgui/src/window_QT.cpp
  2. 15
      modules/highgui/src/window_QT.h

@ -345,7 +345,8 @@ CvWindow* icvFindWindowByName( const char* arg )
CvWindow* w;
CvWinModel* temp;
//This is not a very clean way to do the stuff. Indeed, QAction automatically generate toolTil (QLabel)
//that can be grabbed here and crash the code at 'w->param_name==name'.
foreach (QWidget *widget, QApplication::topLevelWidgets())
{
@ -355,7 +356,7 @@ CvWindow* icvFindWindowByName( const char* arg )
if (temp->type == type_CvWindow)
{
w = (CvWindow*) temp;
if (w->param_name==name)
if (name.compare(w->param_name)==0)
{
window = w;
break;
@ -1685,7 +1686,8 @@ void CvWindow::createShortcuts()
void CvWindow::createToolBar()
{
myToolBar = new QToolBar(this);
myToolBar->setFloatable(false);//is not a window
myToolBar->blockSignals(true);
//myToolBar->setFloatable(false);//is not a window
myToolBar->setMaximumHeight(28);
foreach (QAction *a, vect_QActions)

@ -256,7 +256,7 @@ private:
//Both are top level window, so that a way to differenciate them.
//if (obj->metaObject ()->className () == "CvWindow") does not give me robust result
enum typeWindow{type_CvWindow = 0, type_CvWinProperties = 1};
enum typeWindow{type_CvWindow = 1, type_CvWinProperties = 2};
class CvWinModel : public QWidget
{
@ -280,17 +280,6 @@ private:
};
class GlobalLayout : public QBoxLayout
{
Q_OBJECT
public:
GlobalLayout(QWidget* parent) : QBoxLayout(QBoxLayout::TopToBottom,parent){};
bool hasHeightForWidth () {return true;};
int heightForWidth( int w ) {qDebug()<<"yopyopypp";return w;};
};
class CvWindow : public CvWinModel
{
Q_OBJECT
@ -383,8 +372,6 @@ public:
void setOpenGLCallback(CvOpenGLCallback func,void* userdata, double arg3, double arg4, double arg5);
int getRatio();
void setRatio(int arg);
int heightForWidth( int w );// {qDebug()<<"yopyopypp";return w;};
bool hasHeightForWidth (){qDebug()<<"ask";return true;};
//parameters (will be save/load)
QTransform param_matrixWorld;

Loading…
Cancel
Save