Commit 3e8a8f79 authored by Yannick Verdie's avatar Yannick Verdie

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

parent e693f4b4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment