How to make tabs in Qt look like tabs in Google Chrome? - qt

I don't want my tabs to have a Drag and Drop feature like Chrome (as covered by this question: Apply chrome like tabs in Qt) - I just want them to look like Chrome tabs.
I'm currently using QTabWidget, but its built-in shape QTabWidget::Triangular is so ugly. What do I need to use? Stylesheet or image or something else?

You can use border-image property of the QTabBar::tab. Just read the documentation as to how you could style border-image. There is a nice explanation in the documentation.
I have done something like this using above method.
You could do the same. To change the close button you could style QTabBar::close-button.
The final answer is you can achieve what you required, just using Qt stylesheets.

I'm not really sure how you can make it look exactly like Chrome, but you can try using border-top-left-radius, border-top-right-radius, border-bottom-right-radius, and border-bottom-left-radius in Stylesheets
Reference

Related

How to style divs or li's to look like this progress bar?

I don't know what this is called, so I wasn't able to title this question very well. What I'm wanting to do is make a bar that shows what steps in a process have been completed, like this:
I have no idea how to do this kind of effect, and because I don't know what it's called I haven't been able to find any examples or anything.
How can I make something like in the image above?
Here's a good place to start with the styling: http://css3button.net/81334
What you're looking at is:
css gradients for the backgrounds: http://css-tricks.com/css3-gradients/
text-shadows on the text
box-shadow set to inset for the light detail
and perhaps some pretty advanced :before and :after styles for the points:
http://css-tricks.com/bubble-point-tooltips-with-css3-jquery/
it is called Progress Trackers , it looks similar to Breadcrumb navigation but it has different behavior and uses.
see the following link to see examples and differences between both.
see the following tutorial to build a progress tracker in pure css.

Firebug/Console style hover effect

Think I know the answer to this one, but just thought there may be some genius out there whos know of a way to do this...
Basically I am making a site editor kind of thing and it would be amazingly handy if I could replicate the way Firebug and the Chrome console highlights elements when you hover over their code in the html/elements tabs of those inspectors...
Its not something I can do with background effects because that does not highlight the whole Div (the contents show above the highlight) and I don't think there is anyway of making a div overlay over the top of all the content but have it not block mouseovers on underlying elements...
Anyone any ideas? Is there any browser specific code that achieves this kind of thing?
In general, Firefox extensions are mostly JavaScript. Since Firebug is BSD licensed, you can browse its source code on its project site. Maybe you'll find the relevant code and get an idea how to solve your specific task.
You could add an outline in CSS on mouseover - that would highlight the element without changing its position, as outline does not effect layout. A box-shadow would also work similarly.
In fact, it looks to me like Firebug adds a dark bluish box-shadow to elements to highlight them.

Preventing FF4's new drag feature

Is there a way to prevent this in Firefox 4.0 using CSS? It's where you click on a link (or anything) and begin to drag it, and another semi-transparent image of it appears under your cursor as you drag...
Looks something like this:
Draggable link:
Link
Non-draggable link:
Link
Example.
I have not found a CSS solution yet (I will keep looking), but in the meantime, I found a JavaScript solution in the Mozilla Developer Center's article on Drag Operations. It may be of use to you.
This is not specific to Firefox 4. See this screenshot from my FF 3.6:

How can i produce a select handle by css

I want to produce a sort of select/resiz border when some on click on the div, and when i move mouse over that the cursor should change accordingly. I want the user to be able to drag the element border and the element re-size accordingly
thanks....
You cannot do that with pure CSS. You would have to use JavaScript. I suggest checking out a JavaScript library like jQuery.
Have a look to this jQuery plugin:
Resizable Plugin Demo
This is not something which CSS can do by itself. Javascript is needed to do this sort of behaviour.
If you want to implement this, take a look at the Resizeable function of the jQuery UI library. http://docs.jquery.com/UI/Resizable
This is not a job for CSS. CSS is (mostly) for styling only, not functionality.
Check for example the JQuery resizable plugin. It should be what you need.
As others have mentioned, this isn't something that can be accomplished by CSS, which is presentation only. Have a look at Yahoo's excellent YUI library and their Resize Utility, here is an example:
http://developer.yahoo.com/yui/examples/resize/simple_resize.html
There is a very nice demo of using jQuery to do what you are looking for. It uses the jQuery Resizing with images CSS and a few other things. Take a look at Layout

Simple way to take css-styled box from another website?

I really like a div box that is styled a particular way on another webpage.
I'd like to incorporate the box into my website.
Is there a simple way that I could get the div box on my site? (I feel like I'm going to have understand the entire CSS file before I can make something similar, that is why I am asking).
Usually it is not that hard.
Try out firefox and some extensions:
firebug
webdeveloper
They can help you with highlighting the needed css code.
Just play around a bit with it.
You don't have to understand the whole site CSS by yourself, let the computer do its job.
Get some inspection tool like Firebug (for Firefox) or Dragonfly (for Opera) and see which rules are applied to the box you want and its inner elements. This way you may easily rip only the required rules (just copy and paste non-striked-out ones from the right part of the CSS pane in case of Firebug).

Resources