
#include "sortingbox.h"
#include <QMouseEvent>
#include <QIcon>
#include <QPainter>
#include <QLabel>
#include <QToolButton>
#include <QToolTip>
#include <qlabel.h>

SortingBox::SortingBox(QWidget* parent)
    : QWidget(parent)
{
    setMouseTracking(true);
    setBackgroundRole(QPalette::Base);
    QLabel* errorDirections = new QLabel(this);
    errorDirections->setText("To reproduce error:\n open windows display settings \n set scaling to 125% \n make this window full screen, with \"hover mouse here\" on the far right of the screen \n hover mouse over \"hover mouse here\" to reveal misplaced tooltip");
    errorDirections->setGeometry(0, 0, width(), height());
    newCircleButton = new QToolButton(this);
    newCircleButton->setToolTip("this tooltip will be in the wrong place");
    newCircleButton->setText("Hover mouse here");
    //newCircleButton->setIcon(QIcon(":/images/circle.png"));
    newCircleButton->setIconSize(QSize(120, 120));
}


void SortingBox::resizeEvent(QResizeEvent* /* event */)
{
    newCircleButton->setGeometry(width() - 120, height() - 120, 120, 120);
    return;
}
