Qt weird bug with QLabel (is it really fixed ?)
This commit is contained in:
parent
e693f4b408
commit
3e8a8f7942
@ -345,7 +345,8 @@ CvWindow* icvFindWindowByName( const char* arg )
|
|||||||
CvWindow* w;
|
CvWindow* w;
|
||||||
CvWinModel* temp;
|
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())
|
foreach (QWidget *widget, QApplication::topLevelWidgets())
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -355,7 +356,7 @@ CvWindow* icvFindWindowByName( const char* arg )
|
|||||||
if (temp->type == type_CvWindow)
|
if (temp->type == type_CvWindow)
|
||||||
{
|
{
|
||||||
w = (CvWindow*) temp;
|
w = (CvWindow*) temp;
|
||||||
if (w->param_name==name)
|
if (name.compare(w->param_name)==0)
|
||||||
{
|
{
|
||||||
window = w;
|
window = w;
|
||||||
break;
|
break;
|
||||||
@ -1685,7 +1686,8 @@ void CvWindow::createShortcuts()
|
|||||||
void CvWindow::createToolBar()
|
void CvWindow::createToolBar()
|
||||||
{
|
{
|
||||||
myToolBar = new QToolBar(this);
|
myToolBar = new QToolBar(this);
|
||||||
myToolBar->setFloatable(false);//is not a window
|
myToolBar->blockSignals(true);
|
||||||
|
//myToolBar->setFloatable(false);//is not a window
|
||||||
myToolBar->setMaximumHeight(28);
|
myToolBar->setMaximumHeight(28);
|
||||||
|
|
||||||
foreach (QAction *a, vect_QActions)
|
foreach (QAction *a, vect_QActions)
|
||||||
|
@ -256,7 +256,7 @@ private:
|
|||||||
//Both are top level window, so that a way to differenciate them.
|
//Both are top level window, so that a way to differenciate them.
|
||||||
//if (obj->metaObject ()->className () == "CvWindow") does not give me robust result
|
//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
|
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
|
class CvWindow : public CvWinModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -383,8 +372,6 @@ public:
|
|||||||
void setOpenGLCallback(CvOpenGLCallback func,void* userdata, double arg3, double arg4, double arg5);
|
void setOpenGLCallback(CvOpenGLCallback func,void* userdata, double arg3, double arg4, double arg5);
|
||||||
int getRatio();
|
int getRatio();
|
||||||
void setRatio(int arg);
|
void setRatio(int arg);
|
||||||
int heightForWidth( int w );// {qDebug()<<"yopyopypp";return w;};
|
|
||||||
bool hasHeightForWidth (){qDebug()<<"ask";return true;};
|
|
||||||
|
|
||||||
//parameters (will be save/load)
|
//parameters (will be save/load)
|
||||||
QTransform param_matrixWorld;
|
QTransform param_matrixWorld;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user